Linux SQLDriverConnectW fails but SQLDriverConnect works.
am 17.01.2010 20:07:58 von the6campbells--0016364593c46e489a047d60f43b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Any suggestions as to why the following fails. Using the non-W calls to the
same DSN works okay from same application and versions of unixODBC 2.2.11
Unfortunately, none of the debug/comm logging of postgres gets generated
(does if a successful attach occurs).
Client encoding changed to: UCS2
Content encoding changed to: UCS2
ANSI encoding changed to: UTF-8
SQL_SUCCESS =3D SQLAllocHandle(HandleType =3D SQL_HANDLE_ENV,
InputHandle =3D 0x0, OutputHandlePtr =3D 0xa451c08)
SQL_SUCCESS =3D SQLSetEnvAttr(EnvironmentHandle =3D0xa451c08,
Attribute =3D SQL_ATTR_ODBC_VERSION, Value=3DSQL_OV_ODBC3,StringLength =3D =
0)
SQL_SUCCESS =3D SQLAllocHandle(HandleType =3D SQL_HANDLE_DBC,
InputHandle =3D 0xa451c08, OutputHandlePtr =3D 0xa452198)
SQL_SUCCESS =3D SQLSetConnectAttrW(ConnectionHandle =3D0xa452198,
attribute =3D SQL_ATTR_ODBC_CURSORS, Value=3DSQL_CUR_USE_DRIVER,StringLengt=
h =3D
0)
SQL_ERROR =3D SQLDriverConnectW(ConnectionHandle =3D
0xa452198,WindowHandle =3D
DSN=3DPG84LOCAL;UID=3Dtest;PWD=3D********;;,StringLength1 =3D
SQL_NTS,OutConnectionString =3D ä°Êä°Êãà=
©
ãà©
,BufferLength =3D 1024,StringLength2Ptr
=3D 0SQL_DRIVER_NOPROMPT)
SQL_SUCCESS =3D SQLGetDiagRecW(HandleType =3D SQL_HANDLE_DBC, Han=
dle =3D
0xa452198, RecNumber =3D 1, SQLState =3D 0, NativeErrorPtr =3D 0, MessageTe=
xt =3D
[unixODBC]c, BufferLength =3D 512, TextLengthPtr =3D 11)
SQL_NO_DATA_FOUND =3D SQLGetDiagRecW(HandleType =3D SQL_HANDLE_DBC, Han=
dle =3D
0xa452198, RecNumber =3D 2, SQLState =3D 00000, NativeErrorPtr =3D 0, Messa=
geText
=3D [unixODBC]c, BufferLength =3D 512, TextLengthPtr =3D 0)
SQL_DATETIME_LITERALS=3D119 (3.0) Not Supported
SQL_DBMS_NAME=3D17 (1.0) =3D "PostgreSQL"
SQL_DBMS_VER=3D18 (1.0) =3D "8.4.2"
......
SQL_DM_VER=3D171 (1.0) =3D "03.52.0002.0002"
SQL_DRIVER_HDESC=3D135 (3.0) Not Supported
SQL_DRIVER_HSTMT=3D5 (1.0) Not Supported
SQL_DRIVER_NAME=3D6 (1.0) =3D "psqlodbcw.so"
SQL_DRIVER_ODBC_VER=3D77 (2.0) =3D "03.51"
SQL_DRIVER_VER=3D7 (1.0) =3D "08.04.0100"
--0016364593c46e489a047d60f43b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Any suggestions as to why the following fails. Using the non-W calls to the=
same DSN works okay from same application and versions of unixODBC 2.2.11<=
br>
Unfortunately, none of the debug/comm logging of postgres gets gener=
ated (does if a successful attach occurs).
Client encoding changed to: UCS2
Content encoding changed to: UC=
S2
ANSI encoding changed to: UTF-8
SQL_SUCCESSÂ Â Â =C2=
     Â=A0 =3D SQLAllocHandle(HandleType =3D S=
QL_HANDLE_ENV, InputHandle =3D 0x0, OutputHandlePtr =3D 0xa451c08)
SQL_SUCCESSÂ Â Â Â Â Â Â Â = C2 Â=A0 =3D=
SQLSetEnvAttr(EnvironmentHandle =3D0xa451c08, Attribute =3D SQL_ATTR_ODBC_=
VERSION, Value=3DSQL_OV_ODBC3,StringLength =3D 0)
SQL_SUCCESSÂ =C2=
       Â=A0 =3D SQLAllocHandle(Hand=
leType =3D SQL_HANDLE_DBC, InputHandle =3D 0xa451c08, OutputHandlePtr =3D 0=
xa452198)
SQL_SUCCESSÂ Â Â Â Â Â Â Â = C2 Â=A0 =3D=
SQLSetConnectAttrW(ConnectionHandle =3D0xa452198, attribute =3D SQL_ATTR_O=
DBC_CURSORS, Value=3DSQL_CUR_USE_DRIVER,StringLength =3D 0)
SQL_ER=
RORÂ Â Â Â Â Â Â Â Â =C2 Â Â=A0=
=3D SQLDriverConnectW(ConnectionHandle =3D 0xa452198,WindowHandle =
=3D <null pointer>,InConnectionString =3D DSN=3DPG84LOCAL;UID=3Dtest;=
PWD=3D********;;,StringLength1 =3D SQL_NTS,OutConnectionString =3D ä=
°Êä°Êãà©
ãà©
,BufferLength =
=3D 1024,StringLength2Ptr =3D 0SQL_DRIVER_NOPROMPT)
SQL_SUCCESSÂ Â Â Â Â Â Â Â = C2 Â=A0 =3D=
SQLGetDiagRecW(HandleType =3D SQL_HANDLE_DBC, Handle =3D 0xa452198, RecNum=
ber =3D 1, SQLState =3D 0, NativeErrorPtr =3D 0, MessageText =3D [unixODBC]=
c, BufferLength =3D 512, TextLengthPtr =3D 11)
SQL_NO_DATA_FOUNDÂ =
   =3D SQLGetDiagRecW(HandleType =3D SQL_HANDLE_DBC, Handle=
=3D 0xa452198, RecNumber =3D 2, SQLState =3D 00000, NativeErrorPtr =3D 0, =
MessageText =3D [unixODBC]c, BufferLength =3D 512, TextLengthPtr =3D 0)
SQL_DATETIME_LITERALS=3D119 (3.0) Not Supported
  =C2=
=A0 SQL_DBMS_NAME=3D17 (1.0) =3D "PostgreSQL"
  =C2=
=A0 SQL_DBMS_VER=3D18 (1.0) =3D "8.4.2"
   ...=
....
   SQL_DM_VER=3D171 (1.0) =3D "03.52.0002.0002&=
quot;
   SQL_DRIVER_HDESC=3D135 (3.0) Not Supported
 =C2=
Â=A0 SQL_DRIVER_HSTMT=3D5 (1.0) Not Supported
   SQ=
L_DRIVER_NAME=3D6 (1.0) =3D "psqlodbcw.so"
   =
SQL_DRIVER_ODBC_VER=3D77 (2.0) =3D "03.51"
   =
SQL_DRIVER_VER=3D7 (1.0) =3D "08.04.0100"
--0016364593c46e489a047d60f43b--