Re: error messages?

Re: error messages?

am 17.01.2006 11:37:42 von Antoine

------=_Part_5493_20451169.1137494262250
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Resending the message...

>
> We have installed the odbc driver and are using it as our primary access
> method via vb6. When developing, however, we only get pretty much one err=
or
> message... something like "The driver does not support this functionality=
"
> (but in French, as the doze installs are French ones). This is certainly =
the
> only message we get when there are sql errors. Is something wrong here?
> Are their more complete messages in English? Can I turn these on somehow?
> Cheers
> Antoine
>


--
This is where I should put some witty comment.

------=_Part_5493_20451169.1137494262250
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Resending the message...

"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padd=
ing-left: 1ex;">
We have installed the odbc driver and are using it as o=
ur primary access method via vb6. When developing, however, we only get pre=
tty much one error message... something like "The driver does not supp=
ort this functionality" (but in French, as the doze installs are Frenc=
h ones). This is certainly the only message we get when there are sql error=
s. Is something wrong here?

Are their more complete messages in English? Can I turn these on someho=
w?
Cheers
Antoine
uote>


--
This is where I should put some wit=
ty comment.

------=_Part_5493_20451169.1137494262250--

Re: error messages?

am 17.01.2006 12:45:04 von Ludek Finstrle

Hello,

> We have installed the odbc driver and are using it as our primary access

Which version of psqlodbc? Againist which PgSQL?

> method via vb6. When developing, however, we only get pretty much one error
> message... something like "The driver does not support this functionality"

Maybe you only try unsupported functionality. What mylog output says?

> only message we get when there are sql errors. Is something wrong here?
> Are their more complete messages in English? Can I turn these on somehow?

We don't know how you get the error report. What about SQLSTATE and
error number?

I'm sorry I don't know your situation and you don't describe it well.
Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: error messages?

am 17.01.2006 21:12:19 von Antoine

Ludek Finstrle wrote:
> Hello,
>
>
>>We have installed the odbc driver and are using it as our primary access
>
>
> Which version of psqlodbc? Againist which PgSQL?

Sorry, 8.01.0105 against 8.1.0

>>method via vb6. When developing, however, we only get pretty much one error
>>message... something like "The driver does not support this functionality"
>
>
> Maybe you only try unsupported functionality. What mylog output says?

nope, even "slect * from my_table" gets the same.

> We don't know how you get the error report. What about SQLSTATE and
> error number?

it is by getting the err.description from ado 2.6 under vb6. They all
have the same error number. I will give it a go tomorrow.

> I'm sorry I don't know your situation and you don't describe it well.
> Regards,

Sorry again...
Chrs
A


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: error messages?

am 18.01.2006 10:15:29 von Ludek Finstrle

> >Which version of psqlodbc? Againist which PgSQL?
>
> Sorry, 8.01.0105 against 8.1.0

There is a bug in 08.01.0105 and the fix since 08.01.0106:
| 2) psqlodbc-sqlstate.diff
| fix sqlstate iin case of error in statement

Please try recent development version (08.01.0107 or 08.01.0106 at least).

Milton: Does it solve your problem too?

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: error messages?

am 18.01.2006 14:06:16 von milton

No.. i=B4m still with this problem, i use the last revision(08.01.06)

You can see that with application than i sent to you.

----- Original Message -----
From: "Ludek Finstrle"
To: "Antoine"
Cc:
Sent: Wednesday, January 18, 2006 5:15 AM
Subject: Re: [ODBC] error messages?


> >Which version of psqlodbc? Againist which PgSQL?
>
> Sorry, 8.01.0105 against 8.1.0

There is a bug in 08.01.0105 and the fix since 08.01.0106:
| 2) psqlodbc-sqlstate.diff
| fix sqlstate iin case of error in statement

Please try recent development version (08.01.0107 or 08.01.0106 at least)=
..

Milton: Does it solve your problem too?

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

patch: error messages?

am 20.01.2006 13:31:59 von Ludek Finstrle

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> No.. i=B4m still with this problem, i use the last revision(08.01.06)
>=20
> You can see that with application than i sent to you.

I hope I solve the problem. I don't know if I don't add another one.
Patch appliead.

Please review and comment

Luf

--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psqlodbc-getdiagfield_sqlstate.diff"

diff -c psqlodbc.orig\connection.c psqlodbc\connection.c
*** psqlodbc.orig\connection.c Sun Jan 08 12:12:01 2006
--- psqlodbc\connection.c Fri Jan 20 14:06:22 2006
***************
*** 1612,1619 ****

if (self)
{
! qlog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message));
! mylog("CONN ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message));
qlog(" ------------------------------------------------------------ \n");
qlog(" henv=%u, conn=%u, status=%u, num_stmts=%d\n", self->henv, self, self->status, self->num_stmts);
}
--- 1574,1581 ----

if (self)
{
! qlog("CONN ERROR: func=%s, desc='%s', errnum=%d, sqlstate=%s, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__sqlstate), nullcheck(self->__error_message));
! mylog("CONN ERROR: func=%s, desc='%s', errnum=%d, sqlstate=%s, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__sqlstate), nullcheck(self->__error_message));
qlog(" ------------------------------------------------------------ \n");
qlog(" henv=%u, conn=%u, status=%u, num_stmts=%d\n", self->henv, self, self->status, self->num_stmts);
}
diff -c psqlodbc.orig\environ.c psqlodbc\environ.c
*** psqlodbc.orig\environ.c Wed Nov 30 13:44:17 2005
--- psqlodbc\environ.c Fri Jan 20 14:20:20 2006
***************
*** 311,444 ****

if (NULL != szSqlState)

! switch (status)
! {
! /* now determine the SQLSTATE to be returned */
! case STMT_ROW_VERSION_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01001", "01001");
! /* data truncated */
! break;
! case STMT_TRUNCATED:
! pg_sqlstate_set(env, szSqlState, "01004", "01004");
! /* data truncated */
! break;
! case STMT_INFO_ONLY:
! pg_sqlstate_set(env, szSqlState, "00000", "0000");
! /* just information that is returned, no error */
! break;
! case STMT_BAD_ERROR:
! pg_sqlstate_set(env, szSqlState, "08S01", "08S01");
! /* communication link failure */
! break;
! case STMT_CREATE_TABLE_ERROR:
! pg_sqlstate_set(env, szSqlState, "42S01", "S0001");
! /* table already exists */
! break;
! case STMT_STATUS_ERROR:
! case STMT_SEQUENCE_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY010", "S1010");
! /* Function sequence error */
! break;
! case STMT_NO_MEMORY_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* memory allocation failure */
! break;
! case STMT_COLNUM_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1002");
! /* invalid column number */
! break;
! case STMT_NO_STMTSTRING:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* having no stmtstring is also a malloc problem */
! break;
! case STMT_ERROR_TAKEN_FROM_BACKEND:
! pg_sqlstate_set(env, szSqlState, SC_get_sqlstate(stmt), "S1000");
! /* Use the ODBC 3 sqlstate reported by the backend. */
! break;
! case STMT_INTERNAL_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! case STMT_FETCH_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY106", "S1106");
! break;
!
! case STMT_ROW_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY107", "S1107");
! break;
!
! case STMT_OPERATION_CANCELLED:
! pg_sqlstate_set(env, szSqlState, "HY008", "S1008");
! break;
!
! case STMT_NOT_IMPLEMENTED_ERROR:
! pg_sqlstate_set(env, szSqlState, "HYC00", "S1C00"); /* == 'driver not
! * capable' */
! break;
! case STMT_OPTION_OUT_OF_RANGE_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY092", "S1092");
! break;
! case STMT_BAD_PARAMETER_NUMBER_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1093");
! break;
! case STMT_INVALID_COLUMN_NUMBER_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1002");
! break;
! case STMT_RESTRICTED_DATA_TYPE_ERROR:
! pg_sqlstate_set(env, szSqlState, "07006", "07006");
! break;
! case STMT_INVALID_CURSOR_STATE_ERROR:
! pg_sqlstate_set(env, szSqlState, "07005", "24000");
! break;
! case STMT_ERROR_IN_ROW:
! pg_sqlstate_set(env, szSqlState, "01S01", "01S01");
! break;
! case STMT_OPTION_VALUE_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01S02", "01S02");
! break;
! case STMT_POS_BEFORE_RECORDSET:
! pg_sqlstate_set(env, szSqlState, "01S06", "01S06");
! break;
! case STMT_INVALID_CURSOR_NAME:
! pg_sqlstate_set(env, szSqlState, "34000", "34000");
! break;
! case STMT_NO_CURSOR_NAME:
! pg_sqlstate_set(env, szSqlState, "S1015", "S1015");
! break;
! case STMT_INVALID_ARGUMENT_NO:
! pg_sqlstate_set(env, szSqlState, "HY024", "S1009");
! /* invalid argument value */
! break;
! case STMT_INVALID_CURSOR_POSITION:
! pg_sqlstate_set(env, szSqlState, "HY109", "S1109");
! break;
! case STMT_RETURN_NULL_WITHOUT_INDICATOR:
! pg_sqlstate_set(env, szSqlState, "22002", "22002");
! break;
! case STMT_VALUE_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY019", "22003");
! break;
! case STMT_OPERATION_INVALID:
! pg_sqlstate_set(env, szSqlState, "HY011", "S1011");
! break;
! case STMT_INVALID_DESCRIPTOR_IDENTIFIER:
! pg_sqlstate_set(env, szSqlState, "HY091", "HY091");
! break;
! case STMT_INVALID_OPTION_IDENTIFIER:
! pg_sqlstate_set(env, szSqlState, "HY092", "HY092");
! break;
! case STMT_OPTION_NOT_FOR_THE_DRIVER:
! pg_sqlstate_set(env, szSqlState, "HYC00", "HYC00");
! break;
! case STMT_COUNT_FIELD_INCORRECT:
! pg_sqlstate_set(env, szSqlState, "07002", "07002");
! break;
! case STMT_EXEC_ERROR:
! default:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* also a general error */
! break;
! }
mylog(" szSqlState = '%s',len=%d, szError='%s'\n", szSqlState, pcblen, szErrorMsg);
if (clear_str)
{
--- 311,444 ----

if (NULL != szSqlState)

! if ((stmt->__sqlstate != NULL) && (stmt->__sqlstate[0] != '\0'))
! pg_sqlstate_set(env, szSqlState, stmt->__sqlstate, stmt->__sqlstate);
! else
! switch (status)
! {
! /* now determine the SQLSTATE to be returned */
! case STMT_ROW_VERSION_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01001", "01001");
! /* data truncated */
! break;
! case STMT_TRUNCATED:
! pg_sqlstate_set(env, szSqlState, "01004", "01004");
! /* data truncated */
! break;
! case STMT_INFO_ONLY:
! pg_sqlstate_set(env, szSqlState, "00000", "0000");
! /* just information that is returned, no error */
! break;
! case STMT_BAD_ERROR:
! pg_sqlstate_set(env, szSqlState, "08S01", "08S01");
! /* communication link failure */
! break;
! case STMT_CREATE_TABLE_ERROR:
! pg_sqlstate_set(env, szSqlState, "42S01", "S0001");
! /* table already exists */
! break;
! case STMT_STATUS_ERROR:
! case STMT_SEQUENCE_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY010", "S1010");
! /* Function sequence error */
! break;
! case STMT_NO_MEMORY_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* memory allocation failure */
! break;
! case STMT_COLNUM_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1002");
! /* invalid column number */
! break;
! case STMT_NO_STMTSTRING:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* having no stmtstring is also a malloc problem */
! break;
! case STMT_ERROR_TAKEN_FROM_BACKEND:
! pg_sqlstate_set(env, szSqlState, SC_get_sqlstate(stmt), "S1000");
! /* Use the ODBC 3 sqlstate reported by the backend. */
! break;
! case STMT_INTERNAL_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! case STMT_FETCH_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY106", "S1106");
! break;
! case STMT_ROW_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY107", "S1107");
! break;
! case STMT_OPERATION_CANCELLED:
! pg_sqlstate_set(env, szSqlState, "HY008", "S1008");
! break;
! case STMT_NOT_IMPLEMENTED_ERROR:
! pg_sqlstate_set(env, szSqlState, "HYC00", "S1C00"); /* == 'driver not
! * capable' */
! break;
! case STMT_OPTION_OUT_OF_RANGE_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY092", "S1092");
! break;
! case STMT_BAD_PARAMETER_NUMBER_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1093");
! break;
! case STMT_INVALID_COLUMN_NUMBER_ERROR:
! pg_sqlstate_set(env, szSqlState, "07009", "S1002");
! break;
! case STMT_RESTRICTED_DATA_TYPE_ERROR:
! pg_sqlstate_set(env, szSqlState, "07006", "07006");
! break;
! case STMT_INVALID_CURSOR_STATE_ERROR:
! pg_sqlstate_set(env, szSqlState, "07005", "24000");
! break;
! case STMT_ERROR_IN_ROW:
! pg_sqlstate_set(env, szSqlState, "01S01", "01S01");
! break;
! case STMT_OPTION_VALUE_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01S02", "01S02");
! break;
! case STMT_POS_BEFORE_RECORDSET:
! pg_sqlstate_set(env, szSqlState, "01S06", "01S06");
! break;
! case STMT_INVALID_CURSOR_NAME:
! pg_sqlstate_set(env, szSqlState, "34000", "34000");
! break;
! case STMT_NO_CURSOR_NAME:
! pg_sqlstate_set(env, szSqlState, "S1015", "S1015");
! break;
! case STMT_INVALID_ARGUMENT_NO:
! pg_sqlstate_set(env, szSqlState, "HY024", "S1009");
! /* invalid argument value */
! break;
! case STMT_INVALID_CURSOR_POSITION:
! pg_sqlstate_set(env, szSqlState, "HY109", "S1109");
! break;
! case STMT_RETURN_NULL_WITHOUT_INDICATOR:
! pg_sqlstate_set(env, szSqlState, "22002", "22002");
! break;
! case STMT_VALUE_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY019", "22003");
! break;
! case STMT_OPERATION_INVALID:
! pg_sqlstate_set(env, szSqlState, "HY011", "S1011");
! break;
! case STMT_INVALID_DESCRIPTOR_IDENTIFIER:
! pg_sqlstate_set(env, szSqlState, "HY091", "HY091");
! break;
! case STMT_INVALID_OPTION_IDENTIFIER:
! pg_sqlstate_set(env, szSqlState, "HY092", "HY092");
! break;
! case STMT_OPTION_NOT_FOR_THE_DRIVER:
! pg_sqlstate_set(env, szSqlState, "HYC00", "HYC00");
! break;
! case STMT_COUNT_FIELD_INCORRECT:
! pg_sqlstate_set(env, szSqlState, "07002", "07002");
! break;
! case STMT_EXEC_ERROR:
! default:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* also a general error */
! break;
! }
mylog(" szSqlState = '%s',len=%d, szError='%s'\n", szSqlState, pcblen, szErrorMsg);
if (clear_str)
{
***************
*** 503,579 ****
*pfNativeError = status;

if (NULL != szSqlState)
! switch (status)
! {
! case STMT_OPTION_VALUE_CHANGED:
! case CONN_OPTION_VALUE_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01S02", "01S02");
! break;
! case STMT_TRUNCATED:
! case CONN_TRUNCATED:
! pg_sqlstate_set(env, szSqlState, "01004", "01004");
! /* data truncated */
! break;
! case CONN_INIREAD_ERROR:
! pg_sqlstate_set(env, szSqlState, "IM002", "IM002");
! /* data source not found */
! break;
! case CONNECTION_SERVER_NOT_REACHED:
! case CONN_OPENDB_ERROR:
! pg_sqlstate_set(env, szSqlState, "08001", "08001");
! /* unable to connect to data source */
! break;
! case CONN_INVALID_AUTHENTICATION:
! case CONN_AUTH_TYPE_UNSUPPORTED:
! pg_sqlstate_set(env, szSqlState, "28000", "28000");
! break;
! case CONN_STMT_ALLOC_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* memory allocation failure */
! break;
! case CONN_IN_USE:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! case CONN_UNSUPPORTED_OPTION:
! pg_sqlstate_set(env, szSqlState, "IM001", "IM001");
! /* driver does not support this function */
! case CONN_INVALID_ARGUMENT_NO:
! pg_sqlstate_set(env, szSqlState, "HY009", "S1009");
! /* invalid argument value */
! break;
! case CONN_TRANSACT_IN_PROGRES:
! pg_sqlstate_set(env, szSqlState, "HY010", "S1010");
!
! /*
! * when the user tries to switch commit mode in a
! * transaction
! */
! /* -> function sequence error */
! break;
! case CONN_NO_MEMORY_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! break;
! case CONN_NOT_IMPLEMENTED_ERROR:
! case STMT_NOT_IMPLEMENTED_ERROR:
! pg_sqlstate_set(env, szSqlState, "HYC00", "S1C00");
! break;
! case STMT_RETURN_NULL_WITHOUT_INDICATOR:
! pg_sqlstate_set(env, szSqlState, "22002", "22002");
! break;
! case CONN_VALUE_OUT_OF_RANGE:
! case STMT_VALUE_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY019", "22003");
! break;
! case CONNECTION_COULD_NOT_SEND:
! case CONNECTION_COULD_NOT_RECEIVE:
! pg_sqlstate_set(env, szSqlState, "08S01", "08S01");
! break;
! default:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! }

mylog(" szSqlState = '%s',len=%d, szError='%s'\n", szSqlState, msglen, szErrorMsg);
if (once_again)
--- 503,581 ----
*pfNativeError = status;

if (NULL != szSqlState)
! if ((conn->__sqlstate != NULL) && (conn->__sqlstate[0] != '\0'))
! pg_sqlstate_set(env, szSqlState, conn->__sqlstate, conn->__sqlstate);
! else
! switch (status)
! {
! case STMT_OPTION_VALUE_CHANGED:
! case CONN_OPTION_VALUE_CHANGED:
! pg_sqlstate_set(env, szSqlState, "01S02", "01S02");
! break;
! case STMT_TRUNCATED:
! case CONN_TRUNCATED:
! pg_sqlstate_set(env, szSqlState, "01004", "01004");
! /* data truncated */
! break;
! case CONN_INIREAD_ERROR:
! pg_sqlstate_set(env, szSqlState, "IM002", "IM002");
! /* data source not found */
! break;
! case CONNECTION_SERVER_NOT_REACHED:
! case CONN_OPENDB_ERROR:
! pg_sqlstate_set(env, szSqlState, "08001", "08001");
! /* unable to connect to data source */
! break;
! case CONN_INVALID_AUTHENTICATION:
! case CONN_AUTH_TYPE_UNSUPPORTED:
! pg_sqlstate_set(env, szSqlState, "28000", "28000");
! break;
! case CONN_STMT_ALLOC_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! /* memory allocation failure */
! break;
! case CONN_IN_USE:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! case CONN_UNSUPPORTED_OPTION:
! pg_sqlstate_set(env, szSqlState, "IM001", "IM001");
! /* driver does not support this function */
! case CONN_INVALID_ARGUMENT_NO:
! pg_sqlstate_set(env, szSqlState, "HY009", "S1009");
! /* invalid argument value */
! break;
! case CONN_TRANSACT_IN_PROGRES:
! pg_sqlstate_set(env, szSqlState, "HY010", "S1010");
! /*
! * when the user tries to switch commit mode in a
! * transaction
! */
! /* -> function sequence error */
! break;
! case CONN_NO_MEMORY_ERROR:
! pg_sqlstate_set(env, szSqlState, "HY001", "S1001");
! break;
! case CONN_NOT_IMPLEMENTED_ERROR:
! case STMT_NOT_IMPLEMENTED_ERROR:
! pg_sqlstate_set(env, szSqlState, "HYC00", "S1C00");
! break;
! case STMT_RETURN_NULL_WITHOUT_INDICATOR:
! pg_sqlstate_set(env, szSqlState, "22002", "22002");
! break;
! case CONN_VALUE_OUT_OF_RANGE:
! case STMT_VALUE_OUT_OF_RANGE:
! pg_sqlstate_set(env, szSqlState, "HY019", "22003");
! break;
! case CONNECTION_COULD_NOT_SEND:
! case CONNECTION_COULD_NOT_RECEIVE:
! pg_sqlstate_set(env, szSqlState, "08S01", "08S01");
! break;
! default:
! pg_sqlstate_set(env, szSqlState, "HY000", "S1000");
! /* general error */
! break;
! }

mylog(" szSqlState = '%s',len=%d, szError='%s'\n", szSqlState, msglen, szErrorMsg);
if (once_again)
diff -c psqlodbc.orig\statement.c psqlodbc\statement.c
*** psqlodbc.orig\statement.c Sat Dec 10 08:39:31 2005
--- psqlodbc\statement.c Fri Jan 20 14:09:35 2006
***************
*** 1466,1473 ****

rowsetSize = (7 == self->transition_status ? opts->size_of_rowset_odbc2 : opts->size_of_rowset);

! qlog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message));
! mylog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__error_message));
qlog(" ------------------------------------------------------------ \n");
qlog(" hdbc=%u, stmt=%u, result=%u\n", self->hdbc, self, res);
qlog(" manual_result=%d, prepare=%d, internal=%d\n", self->manual_result, self->prepare, self->internal);
--- 1469,1476 ----

rowsetSize = (7 == self->transition_status ? opts->size_of_rowset_odbc2 : opts->size_of_rowset);

! qlog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, sqlstate=%s, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__sqlstate), nullcheck(self->__error_message));
! mylog("STATEMENT ERROR: func=%s, desc='%s', errnum=%d, sqlstate=%s, errmsg='%s'\n", func, desc, self->__error_number, nullcheck(self->__sqlstate), nullcheck(self->__error_message));
qlog(" ------------------------------------------------------------ \n");
qlog(" hdbc=%u, stmt=%u, result=%u\n", self->hdbc, self, res);
qlog(" manual_result=%d, prepare=%d, internal=%d\n", self->manual_result, self->prepare, self->internal);

--0OAP2g/MAC+5xKAE
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

--0OAP2g/MAC+5xKAE--

Re: patch: error messages?

am 24.01.2006 16:01:00 von milton

It=B4s seems ok.

However, i expected that the error number is in the property
"rdoError(0).number", not in description, because i guess it=B4s a defaul=
t in
the others DB. In the Oracle, Informix and Sqlserver drive, work like thi=
s.

Finally, I think the best would be been in the place of the 7 it went the
error number of DB.

You are more experience than i . What do you think about that?

----- Original Message -----
From: "Ludek Finstrle"
To: "Milton"
Sent: Monday, January 23, 2006 3:40 PM
Subject: Re: patch: [ODBC] error messages?


> Please, Could you send me the DLL=B4s?

Here you're :-) Please drop me a note if it's ok or not.

Regards,

Luf



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Re: error messages?

am 25.01.2006 12:41:46 von Ludek Finstrle

> However, i expected that the error number is in the property
> "rdoError(0).number", not in description, because i guess it=B4s a defa=
ult in
> the others DB. In the Oracle, Informix and Sqlserver drive, work like t=
his.
>=20
> Finally, I think the best would be been in the place of the 7 it went t=
he
> error number of DB.
>=20
> You are more experience than i . What do you think about that?

I'm not much more experienced than you. psqlODBC return 7 for long
time so I don't want change it in 08.01 life cycle. It could break
many application which could depend on 7.

I think you may be able to ask for SQLSTATE separately from description.
BTW SQLSTATE is database backend independant so it could be better
to support SQLSTATE instead of native error number which differ between
databases.

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org