Calling a function via ODBC
От | Valerio Ferrucci |
---|---|
Тема | Calling a function via ODBC |
Дата | |
Msg-id | F24270E7-F1A5-11D6-86F7-00039377EF16@flashnet.it обсуждение исходный текст |
Список | pgsql-odbc |
Hi, I have postgres installed on my Machine (MacOSX) and connect to it via ODBC from my C app. All works ok (select, insert, update and so on). Now I made the following simple function: CREATE OR REPLACE FUNCTION concat_text (TEXT, TEXT) RETURNS TEXT AS ' BEGIN RETURN $1 || $2; END; ' LANGUAGE 'plpgsql'; and called it succesfully doing: SQLExecDirect(... ""select concat_text('val', 'erio')"" ...) and fetching the result with SQLFetchScroll etc..., all works ok. SO WHICH IS THE QUESTION? THE QUESTION IS: Is there a way to call my func using the ODBC syntax: {? = CALL concat_text(?, ?)} using SQLBindParameter to bind variable (input/output) to '?' and getting return value directly in a bound var (without any Fetch) (see http://www.ddart.net/mssql/sql70/odbcht10_1.htm )? Does someone have an example in using SQLBindParameter to set parameter IN and get return value OUT? Thanks for help <fontfamily><param>Geneva</param>================================================================== Valerio Ferrucci Tabasoft Sas ferrucci@tabasoft.it http://www.tabasoft.it </fontfamily> Hi, I have postgres installed on my Machine (MacOSX) and connect to it via ODBC from my C app. All works ok (select, insert, update and so on). Now I made the following simple function: CREATE OR REPLACE FUNCTION concat_text (TEXT, TEXT) RETURNS TEXT AS ' BEGIN RETURN $1 || $2; END; ' LANGUAGE 'plpgsql'; and called it succesfully doing: SQLExecDirect(... ""select concat_text('val', 'erio')"" ...) and fetching the result with SQLFetchScroll etc..., all works ok. SO WHICH IS THE QUESTION? THE QUESTION IS: Is there a way to call my func using the ODBC syntax: {? = CALL concat_text(?, ?)} using SQLBindParameter to bind variable (input/output) to '?' and getting return value directly in a bound var (without any Fetch) (see http://www.ddart.net/mssql/sql70/odbcht10_1.htm )? Does someone have an example in using SQLBindParameter to set parameter IN and get return value OUT? Thanks for help ================================================================== Valerio Ferrucci Tabasoft Sas ferrucci@tabasoft.it http://www.tabasoft.it
В списке pgsql-odbc по дате отправления: