From: Chris Gamache <cgg007@yahoo.com>
To: pgsql-odbc@postgresql.org
To: inoue@postgresql.org
Subject: Unknown Connect Option (Set)
Date: Thu, 17 Oct 2002 15:35:22 -0700 (PDT)
Message-ID: <20021017223522.38642.qmail@web13801.mail.yahoo.com> (raw)
In-Reply-To: <20021015172432.66608.qmail@web13806.mail.yahoo.com>
Still can't find a way to create an ODBC database connection within an MTS
Transaction... Been digging deeper: Here's a sample connection from the
psqlodbc-100.log. I can provide a sample connection from the debug log, but it
is much more detailed and as a result quite a bit longer, and I don't think it
contains information that is any more useful than the regular log.
--[snip...]--
Global Options: Version='07.02.0001', fetch=100, socket=4096, unknown_sizes=0,
m
ax_varchar_size=254, max_longvarchar_size=8190
disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=1
text_as_longvarchar=1, unknowns_as_longvarchar=0,
bools_as_char=
1
extra_systable_prefixes='dd_', conn_settings=''
conn_encoding='O
THER'
conn=33947712, query=' '
conn=33947712, query='set DateStyle to 'ISO''
conn=33947712, query='set geqo to 'OFF''
conn=33947712, query='set ksqo to 'ON''
conn=33947712, query='BEGIN'
conn=33947712, query='declare SQL_CUR01DA0770 cursor for select oid from
pg_type
where typname='lo''
conn=33947712, query='fetch 100 in SQL_CUR01DA0770'
[ fetched 0 rows ]
conn=33947712, query='close SQL_CUR01DA0770'
conn=33947712, query='COMMIT'
conn=33947712, query='BEGIN'
conn=33947712, query='declare SQL_CUR01DA0770 cursor for select version()'
conn=33947712, query='fetch 100 in SQL_CUR01DA0770'
[ fetched 1 rows ]
[ PostgreSQL version string = 'PostgreSQL 7.2.1 on i686-pc-linux-gnu,
compiled by GCC egcs-2.91.66' ]
[ PostgreSQL version number = '7.2' ]
conn=33947712, query='close SQL_CUR01DA0770'
conn=33947712, query='COMMIT'
conn=33947712, query='select pg_client_encoding()'
[ fetched 1 rows ]
[ Client encoding = 'SQL_ASCII' (code = 0) ]
conn=33947712, PGAPI_DriverConnect(out)='DRIVER={PostgreSQL+
(Beta)};DATABASE=et
c;SERVER=10.10.0.1;PORT=5432;UID=user;PWD=pass;ReadOnly=0;Protocol=6.4;F
akeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;F
etch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;D
ebug=1;CommLog=1;Optimizer=1;Ksqo=1;UseDeclareFetch=1;TextAsLongVarchar=1;Unknow
nsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes
=dd_;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0'
CONN ERROR: func=PGAPI_SetConnectOption, desc='fOption=1207, vParam=124387564',
errnum=205, errmsg='Unknown connect option (Set)'
------------------------------------------------------------
henv=31068000, conn=33947712, status=1, num_stmts=16
sock=31067936, stmts=31067856, lobj_type=-999
---------------- Socket Info -------------------------------
socket=1216, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=34082824, buffer_out=31026544
buffer_filled_in=63, buffer_filled_out=0, buffer_read_in=63
conn=33947712, PGAPI_Disconnect
--[\snip...]--
The problem occurs in PGAPI_SetConnectOption ... I've looked at that routine in
options.c, and it seems like its receiving an fOption that it doesn't
understand:
It has the choice of
SQL_ASYNC_ENABLE:
SQL_BIND_TYPE:
SQL_CONCURRENCY:
SQL_CURSOR_TYPE:
SQL_KEYSET_SIZE:
SQL_MAX_LENGTH:
SQL_MAX_ROWS:
SQL_NOSCAN:
SQL_QUERY_TIMEOUT:
SQL_RETRIEVE_DATA:
SQL_ROWSET_SIZE:
SQL_SIMULATE_CURSOR:
SQL_USE_BOOKMARKS:
SQL_ACCESS_MODE: /* ignored */
SQL_AUTOCOMMIT:
SQL_CURRENT_QUALIFIER: /* ignored */
SQL_LOGIN_TIMEOUT: /* ignored */
SQL_PACKET_SIZE: /* ignored */
SQL_QUIET_MODE: /* ignored */
SQL_TXN_ISOLATION: /* ignored */
SQL_ODBC_CURSORS:
SQL_OPT_TRACE:
SQL_OPT_TRACEFILE:
SQL_TRANSLATE_DLL:
SQL_TRANSLATE_OPTION:
and of course...
default:
which gives that error... the culprit is fOption = 1207 which is an unknown
option... I have no idea what that maps to since its not in the isqlext.h file!
So! How can we (safely?) allow that option while connecting without crashing
the odbc driver. What is that option? How would we find out?
CG
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: cgg007@yahoo.com, inoue@postgresql.org
Subject: Re: Unknown Connect Option (Set)
In-Reply-To: <20021017223522.38642.qmail@web13801.mail.yahoo.com>
References: <20021015172432.66608.qmail@web13806.mail.yahoo.com> <20021017223522.38642.qmail@web13801.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox