Server Error in '/' Application.

ERROR [42000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.32-35-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Odbc.OdbcException: ERROR [42000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.32-35-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Source Error:


Line 345:                 oConnection.Open
Line 346:                 oCommand = New ODBCCommand(sSql, oConnection)
Line 347:                 oReader = oCommand.ExecuteReader()
Line 348:                 If oReader.Read()
Line 349:    

Source File: \\windows-pd-0001.fs.locaweb.com.br\WNFS-0001\essencialcasa\web\funcoesprodutoatual.inc    Line: 347

Stack Trace:


[OdbcException (0x80131937): ERROR [42000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.7.32-35-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
   System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +1111142
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) +1059
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) +68
   System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) +79
   System.Data.Odbc.OdbcCommand.ExecuteReader() +12
   ASP.produtoatual_aspx.puxaproduto() in \\windows-pd-0001.fs.locaweb.com.br\WNFS-0001\essencialcasa\web\funcoesprodutoatual.inc:347
   ASP.produtoatual_aspx.Page_Load(Object Sender, EventArgs E) in \\windows-pd-0001.fs.locaweb.com.br\WNFS-0001\essencialcasa\web\produtoatual.aspx:12
   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


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9224.0