Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

value of SQLSTATE

Status
Not open for further replies.

Sivagami

Programmer
Dec 11, 2000
14
0
0
US
Hi all,

I am trying to access SQL Server 6.5 with ODBC 2.0 in C++.
I use SQLGetData command to pull data from the table. This command returns SQL_SUCCESS or SQL_ERROR based on the record. When I try to view the value of SQLSTATE when it is SQL_ERROR, it shows '00000', implying it is a success, but my SQLGETDATA command gives an error.
Does anyone know what is happening??

Shiva.
 
try this one. make use of a byte array to get the sqlstates returned from the SQL_ERROR function. If u don't mind mail ur code to vasanthgnb@yahoo.com. i'll try to help u out. ur code 'll be kept confidential to the max extent.
 
i just made an error in my former reply. make use of the function SQRERROR to get the value of SQLSTATE. make use of a byte array to get the returned value of SQLERROR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top