Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Conversion failed when converting the nvarchar value '00a' to data type int.
sp_NewPost Add Reply sp_NewTopic Add Topic
October 10, 2013
3:55 pm
Henk Helmantel
Admin
Forum Posts: 552
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Thanks for the logs. I have tried to replicate the error but with the recommended database layout for Microsoft SQL Server I am not able to generate the error. If I change the ErrorCode field type in the MessageLog table of the SQL database to INT instead of VARCHAR(80) then I get the exactly same error message.

There is no other cause for this error, at least not one that I can think of, so I still suspect that the database layout of your database specifies the ErrorCode field as a number field and not as a text field.

Regards, Henk

October 10, 2013
1:00 pm
Sarfaraz
Guest
Guests

Hello Henk,

Below is the complete details of the event log:-

EventTime Event Source EventTrace
10/10/2013 16:17 Conversion failed when converting the nvarchar value '00a' to data type int. SQL Connector

"System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value '00a' 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(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at (Object )
at A.PW.A(Object )
at A.XR.B(ArrayList )"

Thanks
Sarfaraz Kasmani

October 4, 2013
2:05 pm
Henk Helmantel
Admin
Forum Posts: 552
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Strange, this is the only reason I can think of that generates this error.

Can you post the full event log record of this error? Maybe the log will give me more information about when the error is generated.

Right-click on the event in the event log and select 'Export to file' to save all information about the event (selecting 'Copy' does not generate all information).

Regards, Henk

October 4, 2013
12:31 pm
Sarfaraz
Guest
Guests

Hello Henk,

The Database field ErrorCode is already showing 'nvarchar(80)' still we are getting this error. Please suggest what data type we should use.

Thanks & Have a great day!!!
Sarfaraz

October 4, 2013
8:25 am
Henk Helmantel
Admin
Forum Posts: 552
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Ah, I understand.

The error code is a text parameter and the corresponding database field should also be a text field, in the example database layout for Microsoft SQL Server you can see that the ErrorCode field in the MessageLog table has the type 'nvarchar(80)'.

My guess is that the ErrorCode field in the MessageLog table of your database has the type 'integer'. When the error code is a number, the database does the conversion from a text value to a number automatically but if the ErrorCode text is a hexadecimal number with alphanumeric characters, the conversion fails and the result will not be written in the database.

The solution is to change the field type of the ErrorCode database field in your database to text, for example to 'nvarchar(80)' if it is a Microsoft SQL Server database.

Regards, Henk

October 4, 2013
5:53 am
Sarfaraz
Guest
Guests

Hello Henk,

We know the error which is coming but the Sql Connector generates an event and throws the error. "Conversion failed when converting the nvarchar value '00a' to data type int.". Hope you have understood what I am trying to say.

Thanks & have a great day!!!
Sarfaraz Kasmani

September 30, 2013
10:09 am
Henk Helmantel
Admin
Forum Posts: 552
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Sarfaraz,

The ErrorCode in the status report from an SMPP service provider is network or SMSC specific and can be different for each SMPP service provider. In general, a status update with an error code just means that the message could not be delivered.

You can ask your SMPP service provider what the error code means, maybe that will explain why the message could not be delivered.

Regards, Henk

September 30, 2013
9:08 am
Sarfaraz
Guest
Guests

Hello Henk,

We are getting this error. some time in between when there is a delivery report update with the value 00a in the ErrorCode. Please let us know what is to be done for this.

Have a great day!!!

Sarfaraz Kasmani

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 494

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 364

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 532

Posts: 1845

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 552