Hi all,
is there a list of open bugs for psqlodbc so I don't post unneccessary
bug reports? I couldn't find one at http://www.postgresql.org/support/
Bug description: psqlodbc 08.00.00.04, psql 8.0.1, Windows XP SP2
After the first connection attempt with SQLConnect fails, for example
due to a bad password (State 28000), any further attempts to connect
with the same handle always return 'Cannot connect to server', state
08001, even if user name and password are correct. psqlodbc_ log attached.
To be able to connect to the server again I have to SQLFree the handle
and SQLAlloc a new handle.
Hajo
Sequence for reproducing the error:
1. allocate handle
2. SQLConnect with invalid username/password
--> returns error State 28000, Authorization failed
3. SQLConnect with valid username/password
--> returns error State 08001, Cannot connect to server
This is the bug. A second attempt with the same handle and valid
credentials should be able to connect to the server.
Workaround
1. allocate handle
2. SQLConnect with invalid username/password
--> returns error State 28000
3. SQLFreeHandle
4. allocate new handle SQLAllocHandle
5. SQLConnect with valid username/password
--> success
--
--------------------------------------------
Lit Window Library - Speed up GUI coding 10x
http://www.litwindow.com/library?src=ml
wxVisualSetup - integrate wxWidgets into Visual Studio .NET
http://www.litwindow.com/Products/products.html?src=ml
BugLister - Defect Tracker
http://www.litwindow.com/buglister?src=ml
Tips & Tricks for wxWidgets & MS Visual Studio
http://www.litwindow.com/Knowhow/knowhow.html?src=ml
conn = 35212112, PGAPI_Connect(DSN='OPOS2', UID='Hajo Kirchhoff', PWD='xxxxx')
Global Options: Version='08.00.0004', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254,
max_longvarchar_size=8190
disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0
text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64
extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER'
ERROR from backend during authentication: 'FATAL: password authentication failed for user "Hajo Kirchhoff"
'
CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=210, errmsg='FATAL: password authentication failed
foruser "Hajo Kirchhoff"
'
------------------------------------------------------------
henv=35212056, conn=35212112, status=0, num_stmts=16
sock=35223128, stmts=35231408, lobj_type=-999
---------------- Socket Info -------------------------------
socket=328, reverse=0, errornumber=0, errormsg='(NULL)'
buffer_in=35223200, buffer_out=35227304
buffer_filled_in=67, buffer_filled_out=0, buffer_read_in=67
DSN info: DSN='OPOS2',server='localhost',port='5432',dbase='opos2-test',user='',passwd='xxxxx'
onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0'
conn_settings='',conn_encoding='OTHER'
translation_dll='',translation_option=''
conn = 35212112, PGAPI_Connect(DSN='OPOS2', UID='Hajo Kirchhoff', PWD='xxxxx')
Global Options: Version='08.00.0004', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254,
max_longvarchar_size=8190
disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0
text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64
extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER'
CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=101, errmsg='Could not connect to the server'
------------------------------------------------------------
henv=35212056, conn=35212112, status=0, num_stmts=16
sock=35223128, stmts=35231408, lobj_type=-999
---------------- Socket Info -------------------------------
socket=328, reverse=0, errornumber=1, errormsg='Socket is already connected'
buffer_in=35223200, buffer_out=35227304
buffer_filled_in=67, buffer_filled_out=0, buffer_read_in=67