Thread: AW: AW: [INTERFACES] Postgres (NT), ODBC and DBTools

AW: AW: [INTERFACES] Postgres (NT), ODBC and DBTools

From
"Teulings, Tim"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo!

> The '?' is fine but it's not getting replaced with the real value.
> The  

Ok. All agree, that preparing is ok and support by ODBC.

> stmt_with_params string in the log is the actual string sent to the
> backend after parsing. I'm just guessing at the flag values, but it
> appears to me that there was not a "Prepare" statement in your code
> after assigning the sql string, and before assigning the parameter
> value. I'm not familiar with DBTools, so I don't know how it
> handles prepares. Normally it would go something like:  

> (pseudo code)
> stmt.sql = 'select foo from bar where it = ?'
> stmt.prepare
> stmt.setparam(1,'avalue')
> stmt.execute

We use DBTools and ODBC to access Informix and DBase, too,
without any problem, so I think we *do* handle preparing
correctly. For me it is more likely that the ODBC driver
for postgres misses something!?

Is there someone out there who has more knowledge about
what the postgres ODBC driver supports and what not.
Is there any other thing I can do or log to make the
case more clear?

It is not easyly possible to switch of binding. There are
several abstraction layer between us and ODBC. Our 
classlibrary automatically generates DBTools, DBTools again
automatically generates ODBC calls...however it would
be nice to support postgres access via ODBC for small
local installations (e.g. for presentations on laptops...).

- -- 
Gruß...      Tim.



-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>

iQA/AwUBOCEuL4aerLtCfP4IEQKB0QCg69WI5NvKso9WPxIi+zmG4fH8rEYAoPQB
ugGEsDgiYL6Jf3qz4y9g5Dt/
=fjM5
-----END PGP SIGNATURE-----


Re: AW: AW: [INTERFACES] Postgres (NT), ODBC and DBTools

From
"Ken J. Wright"
Date:
>We use DBTools and ODBC to access Informix and DBase, too,
>without any problem, so I think we *do* handle preparing
>correctly. For me it is more likely that the ODBC driver
>for postgres misses something!?

I have been using the driver for quite a while, using dynamic sql and the
'?' for parameter binding, so I know it all works, but obviously something
is going wrong for you.

>Is there someone out there who has more knowledge about
>what the postgres ODBC driver supports and what not.

Actually, I thought we might here from Byron, but maybe he is currently
unavailable. Byron knows the guts of the driver. Maybe I can help further.

>Is there any other thing I can do or log to make the
>case more clear?

It would help to also see the trace log. Turn on tracing in the odbc driver
manager. This file can get huge real quick & bring your app to it's knees,
so turn on tracing *just* before you think the offending ODBC call is about
to be made, then turn it off after you receive the ODBC error dialog. This
should just capture information that pertains to the problem. Zip up the
logs & send to me in a private email and I'll see if I can find anything.

Ken