Server Error in '/' Application.

Conversion failed when converting the varchar value 'Mobile' 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 'Mobile' to data type int.

Source Error:


Line 276:            query += "order by sectionname_e asc";
Line 277:            SqlDataAdapter da = new SqlDataAdapter(query, cn);
Line 278:            da.Fill(ds);
Line 279:        }
Line 280:        finally

Source File: d:\Inetpub\wwwroot\server88\telecom\TelecomTiger\telecom2008\telemobi\App_Code\main.cs    Line: 278

Stack Trace:


[SqlException (0x80131904): Conversion failed when converting the varchar value 'Mobile' to data type int.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1968810
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4907339
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2412
   System.Data.SqlClient.SqlDataReader.HasMoreRows() +206
   System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +185
   System.Data.SqlClient.SqlDataReader.Read() +9
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +72
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +164
   System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +353
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +164
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +94
   main.GetPhoneCat(String catid) in d:\Inetpub\wwwroot\server88\telecom\TelecomTiger\telecom2008\telemobi\App_Code\main.cs:278
   phone_cat.Page_Load(Object sender, EventArgs e) in d:\Inetpub\wwwroot\server88\telecom\TelecomTiger\telecom2008\telemobi\phone_cat.aspx.cs:25
   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