pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedVB, RDO, and Parameters
2+ messages / 2 participants
[nested] [flat]
* VB, RDO, and Parameters
@ 1998-05-27 21:43 Krasnow, Greg <gak@hnc.com>
0 siblings, 1 reply; 2+ messages in thread
From: Krasnow, Greg @ 1998-05-27 21:43 UTC (permalink / raw)
To: pgsql-interfaces
Has anyone been able to create Parameterized queries for PostresSQL (using
PostODBC)?
I have a VB app which works fine for Oracle, Access, DB/2, Informix, etc...
and I am trying to use it with a postgres database. In the app I have a
parameter query (i.e. "SELECT ... WHERE fdl1 = ?") I was getting a parse
error on this from the psotgres engine. I then tried using "SELECT ...
WHERE fld1 = $1" and am now getting parameter $1 out of range? Has anyone
out there done anything similar to this?
- Greg
Greg Krasnow
HNC Software Inc.
Financial Industry Solutions
Senior Software Engineer
Email: gak@hnc.com
Direct Phone: 619.799.8341
Fax: 619.799.8036
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] VB, RDO, and Parameters
@ 1998-05-27 23:03 Byron Nikolaidis <byronn@insightdist.com>
parent: Krasnow, Greg <gak@hnc.com>
0 siblings, 0 replies; 2+ messages in thread
From: Byron Nikolaidis @ 1998-05-27 23:03 UTC (permalink / raw)
To: Krasnow, Greg <gak@hnc.com>; +Cc: pgsql-interfaces
Krasnow, Greg wrote:
> Has anyone been able to create Parameterized queries for PostresSQL (using
> PostODBC)?
>
> I have a VB app which works fine for Oracle, Access, DB/2, Informix, etc...
> and I am trying to use it with a postgres database. In the app I have a
> parameter query (i.e. "SELECT ... WHERE fdl1 = ?") I was getting a parse
> error on this from the psotgres engine. I then tried using "SELECT ...
> WHERE fld1 = $1" and am now getting parameter $1 out of range? Has anyone
> out there done anything similar to this?
>
The postgres backend can't handle parameters like this. But, the odbc driver
can. If you create your sql with the parameter markers (?) and then use
SQLBindParameter to supply the parameter values. The driver then replaces the
parameter markers with your parameter data. Access and others do this all the
time and it works great!
Now, as far as VB goes, I'm not sure how SQLBindParameter translates.
Hope this helps.
Byron
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-05-27 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-05-27 21:43 VB, RDO, and Parameters Krasnow, Greg <gak@hnc.com>
1998-05-27 23:03 ` Byron Nikolaidis <byronn@insightdist.com>
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