Error de servidor en la aplicación '/'.

Sintaxis incorrecta cerca de '='.

Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.

Detalles de la excepción: System.Data.SqlClient.SqlException: Sintaxis incorrecta cerca de '='.

Error de código fuente:


Línea 86:         string Query = " SELECT TOP (1000) [ID_Empresa] ,[Nombre_Empresa] ,[Rut] ,[Dv_Rut] ,[Direccion] ,[Id_Comuna] ,[Ciudad] ,[Telefonos] ,[Fax] ,[Email] ,[Activo] ,[Pais] ,[Nombre_Filial] ,[Id_Moneda] ,[Image_Logo_Cabecera] ,[Logo_Mail] ,[Logo_Print] ,[Utiliza_Planificaciones] ,[Id_Red] ,[Acceso_Base_Planificaciones] ,[Utiliza_P360] ,[Email_Copia_Oculta] ,[Utiliza_Orientacion] ,[Utiliza_Gestion] ,[Utiliza_Elearning] ,[Utiliza_Adm_Contenidos] ,[Image_Logo_Cabecera_Derecha] ,[Periodos_Anuales] ,[Modo_Marcacion_Asistencia] ,[Email_Remitente] ,[Password_Remitente] ,[SMTP_Remitente] ,[Id_Director] ,[Id_Firma_Actas] ,[Id_Representante_Legal] ,[Utiliza_Evaluacion] ,[Decreto_Colegio] ,[Utiliza_Academico] ,[Id_Usuario_Colegio] ,[Menu_Dinamico] ,[Nota_Final_Promedio_Asignaturas] ,[Image_Fondo_Cabecera] ,[ColorHuincha] ,[Tipo_Filial] ,[Hallazgos] ,[Secciones_360] ,[GoogleMaps] ,[Logo_Pagina1] ,[Color_Banner_Pagina] ,[Color_Barra_Navegacion] ,[Color_Fondo_Carusel] ,[Profesor_Publica_Unidades] ,[Utiliza_SMS] ,[Color_Links_Menu] ,[Apo_Ven_Compañeros] ,[Es_Home_360] ,isnull([Web_Usa_Calendario],0) as Web_Usa_Calendario ,isnull([Web_Usa_Radio],0) as Web_Usa_Radio FROM [tbl_Empresas] where ID_Empresa=" + Id_Filial;
Línea 87:         System.Data.SqlClient.SqlDataAdapter da1 = new System.Data.SqlClient.SqlDataAdapter(Query, strCon);
Línea 88:         da1.Fill(dt_Filial);
Línea 89: 
Línea 90:         Color_Links_Menu = dt_Filial.Rows[0]["Color_Links_Menu"].ToString();

Archivo de origen: c:\Preduca\net\Pagina_Web\index.aspx.cs    Línea: 88

Seguimiento de la pila:


[SqlException (0x80131904): Sintaxis incorrecta cerca de '='.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2582954
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6034042
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +297
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4291
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +91
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +446
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2698
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1611
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +65
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +251
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +43
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +111
   index.Cargar_Datos_Filial() in c:\Preduca\net\Pagina_Web\index.aspx.cs:88
   index.Page_Load(Object sender, EventArgs e) in c:\Preduca\net\Pagina_Web\index.aspx.cs:78
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Información de versión: Versión de Microsoft .NET Framework:4.0.30319; Versión ASP.NET:4.8.4494.0