Re: Stored procedure support for PSQLODBC

From: Adrian Grucza <adrian(dot)grucza(at)iress(dot)com>
To: Abhishek Kumar <abhishek(dot)aak0(at)gmail(dot)com>
Cc: pgsql-odbc(at)lists(dot)postgresql(dot)org
Subject: Re: Stored procedure support for PSQLODBC
Date: 2024-09-25 06:42:40
Message-ID: CADF4wWrcdr388qFisC0LSMVuGSsBNyYcJS6fJ4Mq97C=0EaChg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Yes, you need to omit the curly braces.

Curly braces is ODBC syntax, and because PostgreSQL used to only have
functions and not procedures, the driver maps this syntax to functions. By
omitting the curly braces you are using the native PostgreSQL CALL
<https://www.postgresql.org/docs/current/sql-call.html> syntax which
executes a procedure.

On Wed, 25 Sept 2024 at 16:22, Abhishek Kumar <abhishek(dot)aak0(at)gmail(dot)com>
wrote:

>
>
> *CAUTION: *This Email is from an EXTERNAL source. Ensure you trust this
> sender before clicking on any links or attachments.
>
>
> Hi,
>
> I am trying to execute a stored procedure query using SQLExecDirect of
> psqlodbc driver.
>
> The sample statement is below
> {call public.SXRCXT18_GETDESC1( ?, ? )}
>
> I am getting an error -
>
> ERROR: public.sxrcxt18_getdesc1(unknown, unknown) is a procedure;
> Error while executing the query SQLNativeErr = {3} SQLErrorText = {4}.
> SQLEXEC Id1 error (SQLState = ERROR: public.sxrcxt18_getdesc1(unknown, unknown) is a procedure;
> Error while executing the query SQLNativeErr = {3} SQLErrorText = {4}
>
>
> Can you please tell me the reason for this? Is there a different way to call stored procedure ?
>
>
> Regards,
>
> Abhishek Kumar
>
>

Adrian Grucza
Technical Lead
Office: +61390185800
adrian(dot)grucza(at)iress(dot)com
www.iress.com
Level 16 385 Bourke St
Melbourne, Victoria, 3000
The contents of this email originated from Iress. For this purpose Iress includes Iress Limited and/or any of its subsidiaries, holding companies and trading entities. ​If you have received this email in error please notify the sender immediately and delete this email.
nosig

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Cramer 2024-09-26 11:13:18 Re: Stored procedure support for PSQLODBC
Previous Message Abhishek Kumar 2024-09-25 06:21:57 Stored procedure support for PSQLODBC