--- ../../VC/psqlodbc-08.00.0004/statement.c 2005-01-28 22:36:20.000000000 +0100 +++ ./statement.c 2005-02-15 19:01:49.058059500 +0100 @@ -500,6 +500,15 @@ SC_set_error(self, STMT_SEQUENCE_ERROR, "Statement is currently executing a transaction."); return TRUE; } + /* + * We get here if a statement is prepared and executed to get the metadata. + */ + if (self->prepare && self->status == STMT_PREMATURE) + { + mylog("SC_opencheck: self->prepare && self->status == STMT_PREMATURE\n"); + return FALSE; + } + if (res = SC_get_Curres(self), NULL != res) { if (res->backend_tuples)