pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Unknown Connect Option (Set)
4+ messages / 3 participants
[nested] [flat]

* Unknown Connect Option (Set)
@ 2002-10-17 22:35 Chris Gamache <cgg007@yahoo.com>
  2002-10-18 09:06 ` Re: Unknown Connect Option (Set) Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 4+ messages in thread

From: Chris Gamache @ 2002-10-17 22:35 UTC (permalink / raw)
  To: pgsql-odbc; inoue@postgresql.org

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Unknown Connect Option (Set)
  2002-10-17 22:35 Unknown Connect Option (Set) Chris Gamache <cgg007@yahoo.com>
@ 2002-10-18 09:06 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  2002-10-18 12:28   ` Re: Unknown Connect Option (Set) Chris Gamache <cgg007@yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Hiroshi Inoue @ 2002-10-18 09:06 UTC (permalink / raw)
  To: cgg007@yahoo.com; +Cc: pgsql-odbc

Chris Gamache wrote:
> 
> 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]

> 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!

isqlext.h isn't used under Windows and 1207 is
SQL_ATTR_ENLIST_IN_DTC. Unfortunately I have little
time to examine how to manage your situation.
How about changing from @TRANSACTION=REQUIRED to
@TRANSACTION=SUPPORTED ?

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Unknown Connect Option (Set)
  2002-10-17 22:35 Unknown Connect Option (Set) Chris Gamache <cgg007@yahoo.com>
  2002-10-18 09:06 ` Re: Unknown Connect Option (Set) Hiroshi Inoue <Inoue@tpf.co.jp>
@ 2002-10-18 12:28   ` Chris Gamache <cgg007@yahoo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Chris Gamache @ 2002-10-18 12:28 UTC (permalink / raw)
  To: Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-odbc


--- Hiroshi Inoue <Inoue@tpf.co.jp> wrote:

> isqlext.h isn't used under Windows and 1207 is
> SQL_ATTR_ENLIST_IN_DTC. Unfortunately I have little
> time to examine how to manage your situation.
> How about changing from @TRANSACTION=REQUIRED to
> @TRANSACTION=SUPPORTED ?

I understand about not being able to spend time on this issue. You've given me
a bit more information to go on. I can start doing some frankenstein mods to
the code now that I understand about SQL_ATTR_ENLIST_IN_DTC. Am I correct in
guessing that there's a resource that lists all the things an ODBC driver
could/should support (and that's how you knew that 1207 was
SQL_ATTR_ENLIST_IN_DTC)... Where would that be?

As for changing @TRANSACTION=REQUIRED to @TRANSACTION=SUPPORTED, that allows
the script to function, but it won't run in an MTS transaction. Rats! :)

CG


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Unknown Connect Option (Set)
@ 2002-10-18 12:32 Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Page @ 2002-10-18 12:32 UTC (permalink / raw)
  To: cgg007@yahoo.com; Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-odbc



> -----Original Message-----
> From: Chris Gamache [mailto:cgg007@yahoo.com] 
> Sent: 18 October 2002 13:28
> To: Hiroshi Inoue; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Unknown Connect Option (Set)
> 
> Am I correct in 
> guessing that there's a resource that lists all the things an 
> ODBC driver could/should support (and that's how you knew 
> that 1207 was SQL_ATTR_ENLIST_IN_DTC)... Where would that be?

The Microsoft Data Access SDK (from www.microsoft.com/data) contains a
useful helpfile and a test suite if you are going to start hacking the
driver.

Regards, Dave.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-10-18 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-17 22:35 Unknown Connect Option (Set) Chris Gamache <cgg007@yahoo.com>
2002-10-18 09:06 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-10-18 12:28   ` Chris Gamache <cgg007@yahoo.com>
2002-10-18 12:32 Re: Unknown Connect Option (Set) Dave Page <dpage@vale-housing.co.uk>

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