Server Error in '/' Application.

Conversion failed when converting the varchar value '29265,29265' to data type int.

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.SqlClient.SqlException: Conversion failed when converting the varchar value '29265,29265' to data type int.

Source Error:


Line 33:             DataSet ds = new DataSet();
Line 34:             da = new SqlDataAdapter(cmd);
Line 35:             da.Fill(ds);
Line 36:             DataTable tb = new DataTable();
Line 37:             tb = ds.Tables[0];

Source File: g:\ApedaApplications\AgriExchange\agriexchange\product_profile\TradeLeads\ViewDetails.aspx.cs    Line: 35

Stack Trace:


[SqlException (0x80131904): Conversion failed when converting the varchar value '29265,29265' to data type int.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2567798
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5982764
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4349
   System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +240
   System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +268
   System.Data.SqlClient.SqlDataReader.Read() +34
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +211
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +197
   System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +410
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +218
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88
   homepage_viewleads.Page_Load(Object sender, EventArgs e) in g:\ApedaApplications\AgriExchange\agriexchange\product_profile\TradeLeads\ViewDetails.aspx.cs:35
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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