pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedSyntax to pass IN parameters through ODBC
2+ messages / 2 participants
[nested] [flat]
* Syntax to pass IN parameters through ODBC
@ 2004-04-09 21:40 Sheeraz fazal <ng@iwerx.vertextek.com>
0 siblings, 1 reply; 2+ messages in thread
From: Sheeraz fazal @ 2004-04-09 21:40 UTC (permalink / raw)
To: pgsql-odbc
Hi,
I am accessing PostgreSQL 7.3.2 through psqlodbc. I need to call a my function "get_number(integer)". I don't know which place holder should i use that ODBC do know that this is for "integer" parameter.
I am using VisualC++. Which require that, parameters should be bound to some name (column name or parameter name) before calling the db function.
If i am calling a function which is not accepting any parameter but returning a value i am using the syntax
"?=call get_number()" and it works. But when i introduct an IN parameter like
"?=call get_number(?)" it doesn't work. I am not sure the format i am using is specific to VisualC++ or it is ODBC standard syntax.
Any response in this regard is highly appreciated.
Thanks,
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Syntax to pass IN parameters through ODBC
@ 2004-08-22 05:03 Mischa Sandberg <mischa.sandberg@telus.net>
parent: Sheeraz fazal <ng@iwerx.vertextek.com>
0 siblings, 0 replies; 2+ messages in thread
From: Mischa Sandberg @ 2004-08-22 05:03 UTC (permalink / raw)
To: pgsql-odbc
Sheeraz fazal wrote:
> I am accessing PostgreSQL 7.3.2 through psqlodbc. I need to call a my
> function "get_number(integer)". I don't know which place holder should i
> use that ODBC do know that this is for "integer" parameter.
>
> I am using VisualC++. Which require that, parameters should be bound to
> some name (column name or parameter name) before calling the db function.
> ...
> But when i introduct an IN parameter like
> "?=call get_number(?)" it doesn't work.
You are indeed using the correct syntax.
(?) is the placeholder for any type of parameter.
Check the doc for SQLBindParameter().
You should be binding to parameters 1 and 2.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-08-22 05:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-09 21:40 Syntax to pass IN parameters through ODBC Sheeraz fazal <ng@iwerx.vertextek.com>
2004-08-22 05:03 ` Mischa Sandberg <mischa.sandberg@telus.net>
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