Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

strange problem with SQLDBC

I had written a small program to create a table in MaxDB using SQLDBC_C and C (In fact it was just a modification of the Helloworld.cpp sample program)

I had tested that program and it was working fine.

When i run the same program today it's not working. I know that sounds very strange. But that's how it is.

Also the SQLDBC_Statement_execute call is returning SQLDBC_OK.

char *tempstr = "CREATE TABLE TEST (NAME VARCHAR(20))";

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

if(SQLDBC_OK != rc) {

// org - fprintf(stderr, "Execution failed %s", stmt->error().getErrorText());

fprintf(stderr, "Execution failed ");

return (1);

}

Does anyone has any clue.

Also, i think database studio is not getting refreshed properly. I had to close the connection to a particular db and relogin to see the effect of dropping a table from sqlcli.

Regards

Raja

replied

Hi,

you are right and you are wrong.

There are database systems who do an implicit commit BEFORE and AFTER each DDL.

But it cannot be named 'naturally'.

There are database systems who are even able to rollback DDL-commands.

And MaxDB belongs to those database systems NOT doing an implicit commit before or after a DDL. Therefore the user has to specify a commit explicitly.

Elke

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question