cancel
Showing results for 
Search instead for 
Did you mean: 

Handle to error object after calling the statement execute - SQLDBC

Former Member
0 Kudos

Topic related to SQLDBC inteface to MaxDB

=======================

In C++ while i was executing the statement

rc = stmt->execute("SELECT 'Hello SAPDB' from DUAL");

i could get a handle to the error object by a call to

stmt->error().getErrorText()

Now while using SQLDBC_C i am using

rc = SQLDBC_Statement_execute(stmt,tempstr,strlen(tempstr),encodAsciiType);

Now how do i get the handle to the error object ??

Call like the above one

fprintf(stderr, "Executed SQLDBC_Statement %s",stmt->error().getErrorText());

gives me compilation error:

error: invalid use of undefined type `struct SQLDBC_Statement'

/opt/sdb/programs/sdk/sqldbc/incl/SQLDBC_C.h:125: error: forward declaration of `struct SQLDBC_Statement'

Please Help and feel free to ask me if the question is not clear.

Regards

Raja

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry. This question doesn't make sense. So, i withdraw the question.

Basically what I had confused with earlier and got clarified now is:

Just like when we make a call to SQLDBC_Connection_connect and after that use the SQLDBC_Connection_getError to get a handle to the SQLDBC_ErrorHndl.

I wanted to know how should we get a handle to the SQLDBC_ErrorHndl after we have made a call to the SQLDBC_Statement_<function call>.

I got the answer after looking through the SQLDBC_C.h file. It will be SQLDBC_Statement_getError and similarly SQLDBC_PreparedStatement_getError.

Wish i could award myself the 10 points for solving the problem

Regards

Raja