libodbc++ or odbc problem

From: Axel(dot)Fix(at)iff(dot)fraunhofer(dot)de
To: pgsql-odbc(at)postgresql(dot)org
Subject: libodbc++ or odbc problem
Date: 2004-05-17 15:39:08
Message-ID: OF489AF529.E7411B76-ONC1256E97.0055FAE8-C1256E97.0055FAF3@iff.fraunhofer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

<FONT face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size=2><DIV><DIV>hallo,</DIV><DIV>&nbsp;</DIV><DIV>i use the cygwin postgresql 7.03.x and i have ported some tables from access to pg. for example the following you can see at the bottom of this mail. and there are some datasets in this table (more than 1!!!).</DIV><DIV>with libodbc++ i login into the db, create and execute my select-statement and let get the resultset with:</DIV><DIV>&nbsp; odbc::ResultSet* rs = stmt-&gt;getResultSet();</DIV><DIV>&nbsp;</DIV><DIV>and with rs-&gt;next() i go to the first dataset. all to this point works fine and the data is also correct. but if i try to get the next dataset with rs-&gt;next() i get&nbsp;this sql-exception:</DIV><DIV>&nbsp;&nbsp;Error fetching numeric statement option: Not positioned on a valid row.</DIV><DIV>&nbsp;</DIV><DIV>but there are more than 1 dataset in this table.</DIV><DIV>the odbc driver seems to work correctly cause access shows me all datasets.</DIV><DIV>&nbsp;</DIV><DIV>i hope, somebody can help me.</DIV><DIV>thanks in advance,</DIV><DIV>axel</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff><P><FONT face="Default Monospace, Courier New, Courier, monospace">CREATE</FONT></FONT><FONT face="Default Monospace, Courier New, Courier, monospace"> <FONT color=#ff0000>TABLE</FONT> public.devices ( key_devclass int4 NOT NULL, key_devname varchar(50) NOT NULL, </FONT><FONT face="Default Monospace, Courier New, Courier, monospace"><FONT color=#ff0000>CONSTRAINT</FONT> devices_pkey PRIMARY KEY (key_devname)</FONT><FONT face="Default Monospace, Courier New, Courier, monospace">) WITH OIDS;</FONT></P></DIV><DIV>&nbsp;</DIV></DIV></FONT>
>From pgsql-odbc-owner(at)postgresql(dot)org Sat May 22 03:47:50 2004
X-Original-To: pgsql-odbc-postgresql(dot)org(at)localhost(dot)postgresql(dot)org
Received: from localhost (unknown [200.46.204.2])
by svr1.postgresql.org (Postfix) with ESMTP id 383D1D1B1C7
for <pgsql-odbc-postgresql(dot)org(at)localhost(dot)postgresql(dot)org>; Sat, 22 May 2004 03:47:47 -0300 (ADT)
Received: from svr1.postgresql.org ([200.46.204.71])
by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024)
with ESMTP id 00791-01
for <pgsql-odbc-postgresql(dot)org(at)localhost(dot)postgresql(dot)org>;
Sat, 22 May 2004 03:47:27 -0300 (ADT)
Received: from bal_proxy00.BAL (unknown [193.170.218.78])
by svr1.postgresql.org (Postfix) with ESMTP id 7C182D1B1A9
for <pgsql-odbc(at)postgresql(dot)org>; Sat, 22 May 2004 03:47:23 -0300 (ADT)
Received: by BAL_PROXY00 with Internet Mail Service (5.5.2653.19)
id <KGFY32AD>; Fri, 21 May 2004 10:54:10 +0200
Message-ID: <551ED10FD7815D4CA218B2DF1042FCC31B072E(at)BAL_PROXY00>
From: Albin Blaschka <Albin(dot)Blaschka(at)bal(dot)bmlfuw(dot)gv(dot)at>
To: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Unknown connect option (Get), Postgres 7.4.2
Date: Fri, 21 May 2004 10:54:10 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
X-Virus-Scanned: by amavisd-new at postgresql.org
X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0
testsÚTE_IN_PAST_12_24
X-Spam-Level:
X-Archive-Number: 200405/38
X-Sequence-Number: 4062

Hello,

Following situation:

I have updated to Postgres 7.4.2 from 7.3.2, the ODBC-Driver stayed the same
We use Access (Office XP) with Windows 2000 as frontend to our data

But now after migration to the new database and a new server, I get
following
error-messages when I want to connect via ODBC (Access) or even via PGAdmin
II (but
PGAdmin III works...):

(taken from the ODBC-Log)
CONN ERROR: func=PGAPI_GetConnectOption, desc='fOption0002', errnum 5,
errmsg='Unknown connect option (Get)'

and a littler after that:

CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect',
errnum5,
errmsg='The database does not exist on the server or user authentication
failed.

This last message appears then in Access (with Errorcode #105) or in PGAdmin
II.

As said above, the connection from the same machine to the database in
question
with PGAdmin III *works with no problems*...only Access and PGAdmin II are
having
problems...

The Database-Server now is a Debian "Sarge" (testing) - Box
(the old one is a Debian "Woody")
Clients are Windows 2000, Access is from Office XP
ODBC-Driver Version is 7.03.02.00

In the archives, I have found quite similar questions/problems, but no
answers...
Some of the messages are quite outdated, maybe now somebody araound here
knows
a solution or what I might have done wrong...

Please help & thanks in advance!
Albin Blaschka

Here is the output of the psqlodbc-log:
CONN ERROR: func=PGAPI_GetConnectOption, desc='fOption0002', errnum 5,
errmsg='Unknown connect option (Get)'
------------------------------------------------------------
henv6060816, conn6066856, status=0, num_stmts
sock6060872, stmts6060944, lobj_type=-999
---------------- Socket Info -------------------------------
socket=-1, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in6077856, buffer_out6081960
buffer_filled_in=0, buffer_filled_out=0, buffer_read_in=0
conn6066856, PGAPI_DriverConnect( in)='DSN=testing7.4.2;',
fDriverCompletion=1
DSN info:
DSN='testing7.4.2',server='balappserver',port='5432',dbase='zuecht',user='al
bin',passwd='xxxxx'

onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
conn_settings='',conn_encoding='OTHER'
translation_dll='',translation_option=''
Global Options: Version='07.03.0200', fetch0, socket(at)96,
unknown_sizes=0,
max_varchar_size%4, max_longvarchar_size90
disable_optimizer=1, ksqo=1, unique_index=1,
use_declarefetch=0
text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=1 NAMEDATALENd
extra_systable_prefixes='pg_;', conn_settings=''
conn_encoding='OTHER'
conn6066856, query=' '
NOTICE from backend during send_query: 'LOG: Anweisung:
'
NOTICE from backend during send_query: 'LOG: Dauer: 0.246 ms
'
CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect',
errnum5, errmsg='The database does not exist on the server
or user authentication failed.'
------------------------------------------------------------
henv6060816, conn6066856, status=0, num_stmts
sock6060872, stmts6060944, lobj_type=-999
---------------- Socket Info -------------------------------
socket–4, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in6077856, buffer_out6081960
buffer_filled_inH, buffer_filled_out=0, buffer_read_inH

And here from the mylog-file:

[1244]globals.extra_systable_prefixes = 'dd_;'
[1244][[SQLAllocHandle]][1244]**** in PGAPI_AllocEnv **
[1244]** exit PGAPI_AllocEnv: phenv = 136060816 **
[1244][[SQLSetEnvAttr]] att 0,2
[1244][[SQLAllocHandle]][1244]PGAPI_AllocConnect: entering...
[1244]**** PGAPI_AllocConnect: henv = 136060816, conn = 136066856
[1244]EN_add_connection: self = 136060816, conn = 136066856
[1244] added at i =0, conn->henv = 136060816, conns[i]->henv 136060816
[1244][SQLGetInfo(30)][1244]PGAPI_GetInfo: entering...fInfoTypew
[1244]PGAPI_GetInfo: p='03.00', len=0, value=0, cbMax
[1244][[SQLSetConnectAttr]] 103
[1244]PGAPI_SetConnectAttr 103
[1244]PGAPI_SetConnectOption: entering fOption = 103 vParam = 20
[1244][[SQLGetConnectAttr]] 30002
[1244]PGAPI_GetConnectAttr 30002
[1244]PGAPI_GetConnectOption: entering...
[1244]CONN ERROR: func=PGAPI_GetConnectOption, desc='fOption0002',
errnum 5, errmsg='Unknown connect option (Get)'
[1244][[SQLSetConnectAttr]] 30002
[1244]PGAPI_SetConnectAttr 30002
[1244]PGAPI_SetConnectOption: entering fOption = 30002 vParam = 122428760
[1244]Microsoft Jet !!!!
[1244][SQLDriverConnect][1244]PGAPI_DriverConnect: entering...
[1244]**** PGAPI_DriverConnect: fDriverCompletion=1,
connStrIn='DSN=testing7.4.2;'
[1244]our_connect_string = 'DSN=testing7.4.2;'
[1244]attribute = 'DSN', value = 'testing7.4.2'
[1244]copyAttributes:
DSN='testing7.4.2',server='',dbase='',user='',passwd='xxxxx',port='',onlyrea
d='',protocol='',conn_settings='',disallow_premature=-1)
[1244]globals.extra_systable_prefixes = 'pg_;'
[1244]our_connect_string = 'DSN=testing7.4.2;'
[1244]attribute = 'DSN', value = 'testing7.4.2'
[1244]CopyCommonAttributes:
A70;A8(at)96;A9=0;B0%4;B190;B2=1;B3=1;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C
0=1;C1=0;C2=pg_;[1244]CC_connect: entering...
[1244]CC_connect(): DSN = 'testing7.4.2', server = 'balappserver', port '5432', database = 'zuecht', username = 'albin', password='xxxxx'
[1244]connecting to the server socket...
[1244]connection to the server socket succeeded.
[1244]sizeof startup packet = 292
[1244]sent the authentication block.
[1244]sent the authentication block successfully.
[1244]gonna do authentication
[1244]read 9, global_socket_buffersize(at)96
[1244]auth got 'R'
[1244]areq = 5
[1244]in AUTH_REQ_MD5
[1244]read 15, global_socket_buffersize(at)96
[1244]auth got 'R'
[1244]areq = 0
[1244]auth got 'K'
[1244]auth got 'Z'
[1244]sending an empty query...
[1244]send_query(): conn6066856, query=' '
[1244]send_query: done sending query
[1244]in QR_Constructor
[1244]exit QR_Constructor
[1244]read 48, global_socket_buffersize(at)96
[1244]send_query: got id = 'N'
[1244]~~~ NOTICE: 'LOG: Anweisung:
'
[1244]send_query: got id = 'I'
[1244]send_query: got id = 'N'
[1244]~~~ NOTICE: 'LOG: Dauer: 0.246 ms
'
[1244]send_query: got id = 'Z'
[1244]got no result from the empty query. (probably database does not
exist)
[1244]QResult: in DESTRUCTOR
[1244]QResult: free memory in, fcount=0
[1244]QResult: free memory out
[1244]QResult: exit DESTRUCTOR
[1244]CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect',
errnum5, errmsg='The database does not exist on the server
or user authentication failed.'
[1244][[SQLGetDiagRec]]
[1244]PGAPI_GetDiagRec entering rec=1[1244]**** PGAPI_ConnectError:
hdbc6066856 <0>
[1244]enter CC_get_error
[1244]enter CC_create_errormsg
[1244]msg = 'The database does not exist on the server
or user authentication failed.'
[1244]exit CC_create_errormsg
[1244]exit CC_get_error
[1244]CC_get_error: status = 105, msg = #The database does not exist on the
server
or user authentication failed.#
[1244] szSqlState = 'S1000',lenr, szError='(null)'
[1244]PGAPI_GetDiagRec exiting 1
[1244][[SQLGetDiagRec]]
[1244]PGAPI_GetDiagRec entering rec=1[1244]**** PGAPI_ConnectError:
hdbc6066856 <74>
[1244]enter CC_get_error
[1244]exit CC_get_error
[1244]CC_get_error: status = 105, msg = #The database does not exist on the
server
or user authentication failed.#
[1244] szSqlState = 'S1000',lenr, szError='The database does not
exist on the server
or user authentication failed.'
[1244]PGAPI_GetDiagRec exiting 0
[1244][[SQLGetDiagField]] Handle=(2,81c3728) Rec=1 Id=8
[1244]PGAPI_GetDiagField entering rec=1[1244]PGAPI_GetDiagField exiting 0
[1244][[SQLGetDiagField]] Handle=(2,81c3728) Rec=1 Id=9
[1244]PGAPI_GetDiagField entering rec=1[1244]PGAPI_GetDiagField exiting 0
[1244][[SQLGetDiagField]] Handle=(2,81c3728) Rec=1 Id
[1244]PGAPI_GetDiagField entering rec=1[1244]PGAPI_GetDiagField exiting 0
[1244][[SQLGetDiagField]] Handle=(2,81c3728) Rec=1 Id
[1244]PGAPI_GetDiagField entering rec=1[1244]PGAPI_GetDiagField exiting 0
[1244][[SQLGetDiagRec]]
[1244]PGAPI_GetDiagRec entering rec=2[1244]**** PGAPI_ConnectError:
hdbc6066856 <0>
[1244]PGAPI_GetDiagRec exiting 100
[1244][[SQLFreeHandle]][1244]PGAPI_FreeConnect: entering...
[1244]**** in PGAPI_FreeConnect: hdbc6066856
[1244]enter CC_Destructor, self6066856
[1244]in CC_Cleanup, self6066856
[1244]after CC_abort
[1244]SOCK_Destructor
[1244]after SOCK destructor
[1244]exit CC_Cleanup
[1244]after CC_Cleanup
[1244]after free statement holders
[1244]exit CC_Destructor
[1244]PGAPI_FreeConnect: returning...
[1244][[SQLFreeHandle]][1244]**** in PGAPI_FreeEnv: env = 136060816 **
[1244]in EN_Destructor, self6060816
[1244]exit EN_Destructor: rv = 1
[1244] ok

--
************************************************************************
** Albin Blaschka, Mag. rer. nat.
** SURE - Successful Restoration and Rehabilitation
** Accompanying Infrastructural Interventions
** BAL Gumpenstein - Federal Research Institute for alpine Regions
** Tel.: ++43 (0)3682 / 22451 - 244
** No trees were killed in the creation of this message.
** However, many electrons were terrible inconvenienced.
************************************************************************

Attachment Content-Type Size
unknown_filename text/html 12.2 KB

Browse pgsql-odbc by date

  From Date Subject
Next Message Benoit Vairelles 2004-05-17 15:51:04 Unicode problem with Microsoft Access
Previous Message Dave Page 2004-05-17 10:34:21 Re: ODBC Driver Options