Re: [INTERFACES] NEW ODBC DRIVER v06-40-0007

From: "Ken J(dot) Wright" <ken(at)ori-ind(dot)com>
To: Byron Nikolaidis <byron(dot)nikolaidis(at)home(dot)com>, pgsql-interfaces(at)hub(dot)org
Subject: Re: [INTERFACES] NEW ODBC DRIVER v06-40-0007
Date: 1999-09-03 04:24:47
Message-ID: 3.0.32.19990902212445.008df1e0@ren.cncware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

>BUG_FIXES:
>
>1. Fix all info functions to check whether the table is a view.
>
>2. Fix for Access 2000 (unconfirmed)
>
>3. Change most statement errors to General Error S1000 instead of 08S01
> (communication link failure).

Byron,

Number 3 is still causing trouble.

from statement.h
#define STMT_BAD_ERROR 27

from environ.c
case STMT_BAD_ERROR:
strcpy(szSqlState, "08S01");
// communication link failure

This is the SQLSTATE the driver is returning when there is a failure from
attempting to duplicate a unique index. It appears to be coming from
SC_execute() in statement.c. The following code is executed if there is not
a result set returned (like from a select). It looks like there needs to be
more checking for other types of non-result set type failures. Create is
the only action looked at here, otherwise it's lumped in with the comm link
failures (STMT_BAD_ERROR).

} else { /* Bad Error -- The error message will be in the Connection */

if (self->statement_type == STMT_TYPE_CREATE) {
self->errornumber = STMT_CREATE_TABLE_ERROR;
self->errormsg = "Error creating the table";
/* This would allow the table to already exists, thus appending
rows to it. BUT, if the table didn't have the same attributes,
it would fail.
return SQL_SUCCESS_WITH_INFO;
*/
}
else {
self->errornumber = STMT_BAD_ERROR;
self->errormsg = "Error while executing the query";
}

Ken

Browse pgsql-interfaces by date

  From Date Subject
Next Message Stephen Wright 1999-09-03 09:55:54 UNSUBSCRIBE
Previous Message Byron Nikolaidis 1999-09-03 03:17:34 NEW ODBC DRIVER v06-40-0007