Server Error in '/' Application.

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and id in (0, 1006, 1045, 1064, 1073, 1078, 1081, 1094, 1113, 1123, 1162, 1185, ' 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: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and id in (0, 1006, 1045, 1064, 1073, 1078, 1081, 1094, 1113, 1123, 1162, 1185, ' at line 1

Source Error:


Line 169:        cmd = new MySqlCommand(sqlpage, conn);
Line 170:
Line 171:        rdr = cmd.ExecuteReader();
Line 172:
Line 173:        //Test.Text = sqlpage;

Source File: e:\hostingspaces\derektes\eastlondonrunners.org.uk\wwwroot\Photos.aspx.cs    Line: 171

Stack Trace:


[MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and id in (0, 1006, 1045, 1064, 1073, 1078, 1081, 1094, 1113, 1123, 1162, 1185, ' at line 1]
   MySql.Data.MySqlClient.MySqlStream.ReadPacket() +281
   MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId) +73
   MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId) +20
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +98
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +784
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1309
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   Photos.Page_Load(Object sender, EventArgs e) in e:\hostingspaces\derektes\eastlondonrunners.org.uk\wwwroot\Photos.aspx.cs:171
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   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.8974; ASP.NET Version:2.0.50727.8974