From ng@iwerx.vertextek.com Fri Apr 9 21:41:09 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 97706D1D065 for ; Fri, 9 Apr 2004 18:41:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 53179-10 for ; Fri, 9 Apr 2004 18:41:09 -0300 (ADT) Received: from one.heavenlyweb.org (one.heavenlyweb.org [209.120.238.50]) by svr1.postgresql.org (Postfix) with ESMTP id 4AAF1D1D064 for ; Fri, 9 Apr 2004 18:41:06 -0300 (ADT) Received: from ip67-153-144-109.z144-153-67.customer.algx.net ([67.153.144.109]:48350 helo=denpcdev01) by one.heavenlyweb.org with smtp (Exim 4.24) id 1BC3kx-00079j-6v for pgsql-odbc@postgresql.org; Fri, 09 Apr 2004 16:41:47 -0500 Message-ID: <001801c41e7b$3fd10490$d903a8c0@glowtek.com> Reply-To: "Sheeraz fazal" From: "Sheeraz fazal" To: Subject: Syntax to pass IN parameters through ODBC Date: Fri, 9 Apr 2004 15:40:14 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0015_01C41E48.F37FE3E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - one.heavenlyweb.org X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - iwerx.vertextek.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/79 X-Sequence-Number: 3974 This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C41E48.F37FE3E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am accessing PostgreSQL 7.3.2 through psqlodbc. I need to call a my funct= ion "get_number(integer)". I don't know which place holder should i use tha= t ODBC do know that this is for "integer" parameter.=20 I am using VisualC++. Which require that, parameters should be bound to som= e name (column name or parameter name) before calling the db function.=20 If i am calling a function which is not accepting any parameter but returni= ng a value i am using the syntax "?=3Dcall get_number()" and it works. But when i introduct an IN parameter = like "?=3Dcall get_number(?)" it doesn't work. I am not sure the format i am usi= ng is specific to VisualC++ or it is ODBC standard syntax. Any response in this regard is highly appreciated. Thanks, ------=_NextPart_000_0015_01C41E48.F37FE3E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I am accessing PostgreSQ= L 7.3.2=20 through psqlodbc. I need to call a my function "get_number(integer)". I don= 't=20 know which place holder should i use that ODBC do know that this is for=20 "integer" parameter.
 
I am using VisualC++. Wh= ich require=20 that, parameters should be bound to some name (column name or parameter nam= e)=20 before calling the db function.
 
If i am calling a functi= on which is=20 not accepting any parameter but returning a value i am using the=20 syntax
"?=3Dcall get_number()" = and it works.=20 But when i introduct an IN parameter like
"?=3Dcall get_number(?)"= it doesn't=20 work. I am not sure the format i am using is specific to VisualC++ or it is= ODBC=20 standard syntax.
 
Any response in this reg= ard is=20 highly appreciated.
 
Thanks,
 
 
------=_NextPart_000_0015_01C41E48.F37FE3E0-- From mischa.sandberg@telus.net Sun Aug 22 05:13:38 2004 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 56CE85E40BA for ; Sun, 22 Aug 2004 02:13:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39590-07 for ; Sun, 22 Aug 2004 05:13:32 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id DBED25E3F15 for ; Sun, 22 Aug 2004 02:13:29 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i7M5DRiG043551 for ; Sun, 22 Aug 2004 05:13:27 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i7M53DcC042033 for pgsql-odbc@postgresql.org; Sun, 22 Aug 2004 05:03:13 GMT From: Mischa Sandberg User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.interfaces.odbc Subject: Re: Syntax to pass IN parameters through ODBC References: <001801c41e7b$3fd10490$d903a8c0@glowtek.com> In-Reply-To: <001801c41e7b$3fd10490$d903a8c0@glowtek.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 16 Message-ID: Date: Sun, 22 Aug 2004 05:03:13 GMT To: pgsql-odbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/40 X-Sequence-Number: 4349 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.