Server Error in '/' Application.

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 '%20  where codnews=''' 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 MySQL server version for the right syntax to use near '%20  where codnews=''' at line 1

Source Error:


Line 107:
Line 108:            conexaoMySQL.Open()
Line 109:            drMySql = MysqlCmd.ExecuteReader()
Line 110:            If drMySql.Read = True Then
Line 111:                strEditorial = "<div style=""margin:10px 0 20px 0; text-align:center; font-weight:700; font-size:18px"" >" & drMySql("chamada") & "</div>" & Server.HtmlDecode(drMySql("materia"))

Source File: C:\Inetpub\vhosts\zbynetmagazine.com\httpdocs\news.aspx.vb    Line: 109

Stack Trace:


[MySqlException (0x80004005): 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 '%20  where codnews=''' at line 1]
   MySql.Data.MySqlClient.MySqlStream.OpenPacket() +280
   MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) +59
   MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() +62
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1008
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1658
   news.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\zbynetmagazine.com\httpdocs\news.aspx.vb:109
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975