Subject | Invalid transaction handle?? |
---|---|
Author | lec_sas |
Post date | 2006-05-18T19:57:51Z |
Ok guys, heres a weird one for you.
I have written myself a function that I use to commit all transactions:
***************************************************
int commit_transaction(isc_tr_handle* tr){
ISC_STATUS status_vector[20];
if(isc_commit_transaction(status_vector, tr)){
//Error Routine
return -1;
}
return 0;
}
*****************************************************
It appears to work fine everwhere but the instance in the following
code. The commit call gets the following error.
"invalid transaction handle <expecting explicit transaction start>"
***************************************************
// variable delarations goes here
if(isc_dsql_execute_immediate(status_vector,
&db,
&tr,
0,
SQL,
1,
NULL)){
/*
Error routine
*/
}
commit_transaction(&tr); // <---- This errors!!!
detach_database(&db);
return 0;
***************************************************************
If I chane the commit_transaction call to the API call
isc_commit_transaction(status_vector, &tr);
it works............
Any ideas? Could this be na issue with the C compiler?
I have written myself a function that I use to commit all transactions:
***************************************************
int commit_transaction(isc_tr_handle* tr){
ISC_STATUS status_vector[20];
if(isc_commit_transaction(status_vector, tr)){
//Error Routine
return -1;
}
return 0;
}
*****************************************************
It appears to work fine everwhere but the instance in the following
code. The commit call gets the following error.
"invalid transaction handle <expecting explicit transaction start>"
***************************************************
// variable delarations goes here
if(isc_dsql_execute_immediate(status_vector,
&db,
&tr,
0,
SQL,
1,
NULL)){
/*
Error routine
*/
}
commit_transaction(&tr); // <---- This errors!!!
detach_database(&db);
return 0;
***************************************************************
If I chane the commit_transaction call to the API call
isc_commit_transaction(status_vector, &tr);
it works............
Any ideas? Could this be na issue with the C compiler?