freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] ODBC: Not reporting some error messages?
- From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] ODBC: Not reporting some error messages?
- Date: Fri, 7 Feb 2003 13:39:01 +0100
>
> Hi,
>
> I noticed that some queries (whether performed through
> SQLExecDirect or
> SQLPrepare/SQLExecure) do not return full error messages. Are
> ODBC error
> messages still not fully implemented in FreeTDS?
>
> Examples:
>
> SLECT uid FROM master..sysusers
> Msg 156, Level 15, State 1, Server MEGATRON, Line 1
> Incorrect syntax near the keyword 'FROM'.
> Correct.
>
> SELECT ui FROM master..sysusers
> Msg 207, Level 16, State 3, Server MEGATRON, Line 1
> Invalid column name 'ui'.
> Correct.
>
> SELECT x.uid FROM master..sysusers
> (SQLGetDiagRec does not return SQL_SUCCESS, and hence no
> error message)
> Oops!
>
> (This is what I get in Microsoft Query Manager:
> Msg 107, Level 16, State 2, Line 1
> The column prefix 'x' does not match with a table name or
> alias name used
> in the query.)
>
>
> The bug (or not bug) that I reported earlier today could be
> related to
> this. It could also be unixODBC's fault (I'm using 2.2.2) and
> not FreeTDS
> (Using 0.61rc1 on RedHat 8 x86)
>
> Thanks!
>
It's strange...
Using unixODBC 2.2.3 work...
Try to modify src/odbc/unittests/print.c line
command = "SELECT donotexistsfield FROM donotexiststable";
into
command = "SELECT x.uid FROM master..sysusers";
and do a
# make print
from src/odbc/unittests
Should print something like
odbctest
--------
connection parameters:
server: 'XXXX'
user: 'sa'
password: '????'
database: 'tempdb'
use tempdb
print 'Test message'
Message: [unixODBC] Msg 0, Level 0, State 1, Server XXXX, Line 1
Test message
SELECT x.uid FROM master..sysusers
Message: Msg 107, Level 16, State 2, Server XXXX, Line 1
The column prefix 'x' does not match with a table name or alias name used in
the query.
Message: [unixODBC][Driver Manager]Function sequence error
Message: [unixODBC][Driver Manager]Function sequence error
Done.
(used CVS 0.61 version, ODBC not changed from 0.61rc1)
If this not work try to enable unixODBC log and post it.
freddy77
=================================
"STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."
=================================
-
[freetds] ODBC: Not reporting some error messages?,
Craig Davison, 02/06/2003
- <Possible follow-up(s)>
-
RE: [freetds] ODBC: Not reporting some error messages?,
ZIGLIO Frediano, 02/07/2003
- Re: [freetds] ODBC: Not reporting some error messages?, Craig Davison, 02/07/2003
Archive powered by MHonArc 2.6.24.