Re: Syntax to pass IN parameters through ODBC

From: Mischa Sandberg <mischa(dot)sandberg(at)telus(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Syntax to pass IN parameters through ODBC
Date: 2004-08-22 05:03:13
Message-ID: lOVVc.43889$X12.26691@edtnps84
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Mischa Sandberg 2004-08-22 05:15:16 Re: [iODBC] Driver could not be loaded, SQLSTATE=IM002
Previous Message Mischa Sandberg 2004-08-22 04:49:45 Re: Access - ODBC - serial problem...