Re: Problem with libpsqlodbc - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: Problem with libpsqlodbc
Date
Msg-id 3B8D85AE.877AB230@tpf.co.jp
Whole thread Raw
In response to RE: Problem with libpsqlodbc  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-odbc
Gilles DAROLD wrote:
>
> Yes it work on other database but probably i'm missing something...

It's a limited spec of PostgreSQL that SELECT can call
function(procedure)s but SELECT returns a result set
not a parameter.

>
> For oracle they do
>
> create_proc => '{call create_person(?)}'
> add_proc      => '{call set_person_name(?,?)}'

It's an ODBC's spec to call a procedure.

>
> Is that the problem ? Should I use call ?

There seems to be 2 ways.

1) You could use the following.
    create_proc => '{?=call create_person(?)}'
    add_proc => '{?=call set_person_name(?, ?)}'
    (optional parameter marker ?= at the start of the syntax
     is needed if you need to accept the return value)

  But psqlodbc driver couldn't handle the syntax
  other than that of the latest snapshot.
  Could you try it ?

2) SELECT returns a result set.
  You could fetch and get the result using
  SQLFetch(), SQLGetData() etc.

regards,
Hiroshi Inoue

pgsql-odbc by date:

Previous
From: Terry
Date:
Subject: Re: msaccess
Next
From: "Marc G. Fournier"
Date:
Subject: Majordomo being upgraded ...