Microsoft
Software
Hardware
Network
Question : Problem: SQLExecDirect ODBC return codes
Where can I find a list of what the different return codes mean for ODBC Direct SQL? I'm geting a -2 return code in my c++ application when I call the ODBCExecDirect statement and have no idea what that means.
Code Snippet:
1:
result = ::SQLExecDirect(hstmtCostCtr, (UCHAR*)((LPCTSTR)sSql), SQL_NTS);
Open in New Window
Select All
Answer : Problem: SQLExecDirect ODBC return codes
SQL_INVALID_HANDLE is a -2 value
Private Const SQL_SUCCESS = 0
Private Const SQL_SUCCESS_WITH_INFO = 1
Private Const SQL_NO_DATA = 100 ' Same as SQL_NO_DATA_FOUND
Private Const SQL_ERROR = (-1)
Private Const SQL_INVALID_HANDLE = (-2)
Private Const SQL_NEED_DATA = 99
Private Const SQL_STILL_EXECUTING = 2
Random Solutions
Problem: HP EX470 Power Supply replacement
Problem: Problem between WRT54G router and westell 6100 dsl modem
Problem: second harddrive, Quantum Fireball EL 10GB, not recognized. Primary HD is Maxtor 6Y120P0. OS is Win98, not SE.
Problem: Machine freezes minutes after start-up
Problem: Applying policies in server 2003
Problem: Locating a 5 1/4 inch floppy drive
Problem: Adding Static routes
Problem: Startup menu
Problem: Make recovery partition without Ghost
Problem: Ability to reply in HTML format with BES 4.1.6