>Since you don't seem to be running your pass-through synchronously (this is set with SQLSETPROP()), the only values SQLEXEC should return are 1 and -1. A return value of -1 is a connection level error, meaning something went wrong on the SQLServer side. Use AERROR() to get the error message SQLServer sent back. The error message is in the second column of the array row. Output the message in your MESSAGEBOX(). Be aware that sometimes SQLServer will return more than one error message, so check all the rows in your AERROR array.
More information I got for this problem after applying aerror() follows:
1. Arithmetic overflow converting numeric to type tinyint
2. 1526 Connection Error:[Microsoft][ODBC SQL Server Driver]Protocol error in TDS streams,
It seems that the values I used in sqlexec statements have some problems with the datatype I declare in the stored procedure arguments. One trial I can figure out is to change the datatype in the stored procedure declaration and the related tables. However, beside doing this, is there any easier way?
Still I don't have any idea with the second error message. Can someone please help.
There are also some problem when I executed query through SQL enterprise manger. The error messages read
DB-Library Process Dead - Connection Broken
and
DB-Library: Possible network error: Error in sending out-of-band data to SQL Server. Connection broken.
Net-Library error 232: ConnectionRead (NLReadFile()).
How can I deal with it? Many thanks!
Best regards,
Ron.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only