This is a migrated thread and some comments may be shown as answers.

Weird RadGrid Error - Please help

4 Answers 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 21 Nov 2012, 09:34 PM
I am getting an error that is just causing me all sorts of consternation finding a solution to.  My code was working until I made some changes and posted it back onto the production server.  The biggest problem here is that I don't get the error to occur on my dev machine so I can't use my debugger for any help.

I have an ASPX website with a Telerik RadGrid (version 2011.2.915.40) with another couple of RadGrids inside of the main 
NestedViewTemplate.  I have checked all throughout my code looking for a place where this conversion from
nvarchar to int may be taking place yet i can't find it.  I don't understand why this error is occurring and 
would be most grateful to anyone that has run into something like this before and can give me a heads up
on what might be happening.  Please see error message below.

Thanks,

James


Javascript error on Browser:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)
Timestamp: Wed, 21 Nov 2012 21:11:39 UTC
Message: Sys.WebForms.PageRequestManagerServerErrorException: Conversion failed when converting the nvarchar value 'CO00024843' to data type int.
Line: 3
Char: 74741
Code: 0
URI: https://localhost/IPM/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.60919.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aee051b62-9cd6-49a5-87bb-93c07bc43d63%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a9799c67b-558a-475d-bf30-a0ccf0dbb8b7%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc%3a24ee1bba%3a19620875%3a874f8ea2%3af46195d3%3a490a9d4e%3abd8f85e4%3a58366029%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289

CodeBehind error:  System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the nvarchar value 'CO00024843' to data type int.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.HasMoreRows()
   at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
   at System.Data.SqlClient.SqlDataReader.Read()
   at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callb

4 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 26 Nov 2012, 09:54 AM
Hi James,

I am afraid we are unable to determine what is causing the problem without a sample application demonstrating the exact problematic behavior. As the error itself indicates, probably it is an issue related to your database configuration.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
James
Top achievements
Rank 1
answered on 26 Nov 2012, 02:52 PM
Eyup,

I understand and I  could send my whole project but because it only errors on the server and not on my development machine, I don't know how I could give you anything that would help.  I don't have a piece of code that is for sure going to error on your machine.  It seems to be some sort of JavaScript error that is occurring in the AJAX.  I just don't know how to get at resolving this.  Please, if anyone can help it would be greatly appreciated.
0
James
Top achievements
Rank 1
answered on 27 Nov 2012, 06:34 PM
Can you tell me from the errors if it looks as though this error is being caused by the grid as it queries the database?  I really don't understand what is going on here.
0
Eyup
Telerik team
answered on 28 Nov 2012, 08:59 AM
Hi James,

Based on the error, the issue arises on SQL operation level and it does not seem to be related to RadControls. I am afraid it is impossible to debug and track the cause of the problem without a sample runnable application.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Eyup
Telerik team
James
Top achievements
Rank 1
Share this question
or