Server Error in '/' Application.

Syntax error in string in query expression 'comune='ROSALI'' and idprodotti=39 order by comune'.

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.OleDb.OleDbException: Syntax error in string in query expression 'comune='ROSALI'' and idprodotti=39 order by comune'.

Source Error:


Line 23:         dtAdapter.SelectCommand = objCmd
Line 24: 
Line 25:         dtAdapter.Fill(ds)
Line 26:         dt = ds.Tables(0)
Line 27: 

Source File: D:\inetpub\webs\todaysoftwareit\SoftwareDettaglioRicercaComune.aspx.vb    Line: 25

Stack Trace:


[OleDbException (0x80040e14): Syntax error in string in query expression 'comune='ROSALI'' and idprodotti=39 order by comune'.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +44
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +245
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +190
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +162
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +112
   System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +128
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +90
   SoftwareDettaglioRicercaComune.CreateDsToDt(String strSQL) in D:\inetpub\webs\todaysoftwareit\SoftwareDettaglioRicercaComune.aspx.vb:25
   SoftwareDettaglioRicercaComune.comune() in D:\inetpub\webs\todaysoftwareit\SoftwareDettaglioRicercaComune.aspx.vb:80
   SoftwareDettaglioRicercaComune.Page_Load(Object sender, EventArgs e) in D:\inetpub\webs\todaysoftwareit\SoftwareDettaglioRicercaComune.aspx.vb:87
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2603


Version Information: Microsoft .NET Framework Version:2.0.50727.9174; ASP.NET Version:2.0.50727.9175