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

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

From
"Ansley, Michael"
Date:
Hi, Dave,

You actually can bind variables, but I've only ever seen it done with stored
procs.  You may also be able to do it if you prepare the statement.
However, for a straight throw-away query, it seems a little odd.

How does PG handle this anyway?

MikeA

-----Original Message-----
From: Dave Page
To: 'pgsql-interfaces@postgresql.org'
Cc: 'Tim.Teulings@materna.de'
Sent: 99/11/03 05:21
Subject: RE: [INTERFACES] Postgres (NT), ODBC and DBTools

> -----Original Message-----
> From: Teulings, Tim [mailto:Tim.Teulings@materna.de]
> Sent: 03 November 1999 14:34
> To: 'pgsql-interfaces@postgresql.org'
> Subject: AW: [INTERFACES] Postgres (NT), ODBC and DBTools

<Snip>
> 
> After looking at it again, I'm not sure if it is a problem with the
> colon. The "?" in the statement looks supicious (itis near the
> 'where'
> stated in the error message). AFAIK ODBC does allow binding of
> variables
> (bind variable, bound expresion) and DBTools uses this. Is the "?"
> legal
> at this point (it references the value bound to a variable) or is it
> a
> error?
> 
> Perhaps it is a problem with the ODBC driver settings?

I am sure that the ? is the problem. I've never heard of binding
variables
with ODBC, but then I'm not an ODBC expert - I tend to let ADO/DAO deal
with
that side of things!

Perhaps Byron or someone else can provide a definate answer?

Regards,
Dave.
-- 
Network & Systems Manager, The Vale Housing Association.
http://www.vale-housing.co.uk (Work)
http://www.pgadmin.freeserve.co.uk (Home of pgAdmin)
Beer can be a permanent solution, but only if you have enough of it!

************


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

From
"Ken J. Wright"
Date:
>You actually can bind variables, but I've only ever seen it done with stored
>procs.  You may also be able to do it if you prepare the statement.
>However, for a straight throw-away query, it seems a little odd.
>
>How does PG handle this anyway?

Postgres doesn't do any preparing or binding. That is all handled by the
ODBC driver. It would be nice if some day the backend would do this, but
'till then.....

Ken

>
>MikeA
>
>-----Original Message-----
>From: Dave Page
>To: 'pgsql-interfaces@postgresql.org'
>Cc: 'Tim.Teulings@materna.de'
>Sent: 99/11/03 05:21
>Subject: RE: [INTERFACES] Postgres (NT), ODBC and DBTools
>
>> -----Original Message-----
>> From: Teulings, Tim [mailto:Tim.Teulings@materna.de]
>> Sent: 03 November 1999 14:34
>> To: 'pgsql-interfaces@postgresql.org'
>> Subject: AW: [INTERFACES] Postgres (NT), ODBC and DBTools
>
><Snip>
>> 
>> After looking at it again, I'm not sure if it is a problem with the
>> colon. The "?" in the statement looks supicious (itis near the
>> 'where'
>> stated in the error message). AFAIK ODBC does allow binding of
>> variables
>> (bind variable, bound expresion) and DBTools uses this. Is the "?"
>> legal
>> at this point (it references the value bound to a variable) or is it
>> a
>> error?
>> 
>> Perhaps it is a problem with the ODBC driver settings?
>
>I am sure that the ? is the problem. I've never heard of binding
>variables
>with ODBC, but then I'm not an ODBC expert - I tend to let ADO/DAO deal
>with
>that side of things!
>
>Perhaps Byron or someone else can provide a definate answer?
>
>Regards,
> 
>Dave.
> 
>-- 
>Network & Systems Manager, The Vale Housing Association.
>http://www.vale-housing.co.uk (Work)
>http://www.pgadmin.freeserve.co.uk (Home of pgAdmin)
>Beer can be a permanent solution, but only if you have enough of it!
>
>************
>
>************
>