Server Error in '/' Application.

ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.7.44-49-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 '148' 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.1 Driver][mysqld-5.7.44-49-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 '148' at line 1

Source Error:


Line 12:         Query.Connection = MyConnection
Line 13:         Query.CommandText = "select * FROM nieuws WHERE id = " + nieuwsnummer + " "
Line 14:         Dim reader As OdbcDataReader = Query.ExecuteReader()
Line 15: 		 Dim MyMin As Integer = 1, MyMax As Integer = 4, RandomNumber As Integer
Line 16:                     ' Create a random number generator

Source File: D:\WebSites\dunkersbe\www\nieuwsbericht.aspx.vb    Line: 14

Stack Trace:


[OdbcException (0x80131937): ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.7.44-49-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 '148' at line 1]
   System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +1156850
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) +1147
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) +61
   System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) +75
   System.Data.Odbc.OdbcCommand.ExecuteReader() +6
   Nieuws.Page_Load(Object sender, EventArgs e) in D:\WebSites\dunkersbe\www\nieuwsbericht.aspx.vb:14
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062