Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 15F309FA2A7 for ; Thu, 11 Jan 2007 16:03:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 90582-07 for ; Thu, 11 Jan 2007 16:03:05 -0400 (AST) X-Greylist: delayed 00:12:13.311362 by SQLgrey-1.7.4 Received: from imf01aec.mail.bellsouth.net (imf01aec.mail.bellsouth.net [205.152.59.49]) by postgresql.org (Postfix) with ESMTP id C11359FA16B for ; Thu, 11 Jan 2007 16:03:00 -0400 (AST) Received: from ibm62aec.bellsouth.net ([68.211.221.233]) by imf20aec.mail.bellsouth.net with ESMTP id <20070111195046.YIH17113.imf20aec.mail.bellsouth.net@ibm62aec.bellsouth.net> for ; Thu, 11 Jan 2007 14:50:46 -0500 Received: from [192.168.20.33] (really [68.211.221.233]) by ibm62aec.bellsouth.net with ESMTP id <20070111195046.BTEZ20444.ibm62aec.bellsouth.net@[192.168.20.33]> for ; Thu, 11 Jan 2007 14:50:46 -0500 Message-ID: <45A695F1.4010908@barik.net> Date: Thu, 11 Jan 2007 14:54:25 -0500 From: Titus Barik User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: GetData to Procedure return failed Content-Type: multipart/mixed; boundary="------------030207070707000001010405" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200701/18 X-Sequence-Number: 8557 This is a multi-part message in MIME format. --------------030207070707000001010405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit All, When attempting to call a stored procedure from a SQL Data Block (SQD/SQT) within the proprietary GE iFIX HMI 4.0 application, I obtain the following error: Error executing SQL cmd: GetData to Procedure return failed. Since the application is proprietary, obtaining debugging information about this error was difficult. Still, by enabling the CommLog under advanced OBBC options for the PostgreSQL ANSI ODBC 8.02.02.00 driver, I was able to obtain more detailed, through cryptic, log information from the CommLog file, which I have attached. The stored procedure in question has nothing of particular of interest: it takes in a VARCHAR, an INTEGER, and returns a VARCHAR. I am using PostgreSQL 8.2.1 on i686-pc-mingw32, compiled by GCC. At this time, I have been unable to find a resolution for this issue. I am not certain, but I do not believe that this issue occurred under PostgreSQL 7.x. Can anyone provide any assistance in decrypting these log messages? Is this a bug in the ODBC driver? Regards, Titus Barik titus@barik.net --------------030207070707000001010405 Content-Type: text/plain; name="sqlerr.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sqlerr.txt" conn=00DF3EA8, query='select proname, proretset, prorettype, pronargs, proargtypes, nspname, p.oid, atttypid, attname, proargnames, proargmodes, proallargtypes from ((pg_catalog.pg_namespace n inner join pg_catalog.pg_proc p on p.pronamespace = n.oid) inner join pg_type t on t.oid = p.prorettype) left outer join pg_attribute a on a.attrelid = t.typrelid and attnum > 0 and not attisdropped where has_function_privilege(p.oid, 'EXECUTE') and proname like 'phsename' order by nspname, proname, p.oid, attnum' [ fetched 1 rows ] conn=00DF3EA8, query='SELECT * FROM phsename(E'Reference Recipe A',0)' [ fetched 1 rows ] STATEMENT ERROR: func=PGAPI_GetData, desc='', errnum=13, errmsg='Invalid column number.' ------------------------------------------------------------ hdbc=00DF3EA8, stmt=00DF8A00, result=013B3F40 prepare=0, internal=0 bindings=00DFC140, bindings_allocated=1 parameters=013B3FF0, parameters_allocated=2 statement_type=9, statement='{call phsename(?,?)}' stmt_with_params='SELECT * FROM phsename(E'Reference Recipe A',0)' data_at_exec=-1, current_exec_param=-1, put_data=0 currTuple=0, current_col=0, lobj_fd=-1 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1 cursor_name='SQL_CUR00DF8A00' ----------------QResult Info ------------------------------- fields=013B3C70, backend_tuples=00DF8C98, tupleField=14650520, conn=00DF3EA8 fetch_count=0, num_total_rows=1, num_fields=1, cursor='(NULL)' message='(NULL)', command='SELECT', notice='(NULL)' status=100, inTuples=0 CONN ERROR: func=PGAPI_GetData, desc='', errnum=216, errmsg='Couldn't set unsupported connect attribute 1' ------------------------------------------------------------ henv=00DF3E78, conn=00DF3EA8, status=1, num_stmts=16 sock=00DF2138, stmts=00DF2200, lobj_type=-999 ---------------- Socket Info ------------------------------- socket=500, reverse=0, errornumber=0, errormsg='(NULL)' buffer_in=14641648, buffer_out=14645752 buffer_filled_in=67, buffer_filled_out=0, buffer_read_in=67 STATEMENT ERROR: func=SC_execute, desc='', errnum=1, errmsg='GetData to Procedure return failed.' ------------------------------------------------------------ hdbc=00DF3EA8, stmt=00DF8A00, result=013B3F40 prepare=0, internal=0 bindings=00DFC140, bindings_allocated=1 parameters=013B3FF0, parameters_allocated=2 statement_type=9, statement='{call phsename(?,?)}' stmt_with_params='SELECT * FROM phsename(E'Reference Recipe A',0)' data_at_exec=-1, current_exec_param=-1, put_data=0 currTuple=0, current_col=0, lobj_fd=-1 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1 cursor_name='SQL_CUR00DF8A00' ----------------QResult Info ------------------------------- fields=013B3C70, backend_tuples=00DF8C98, tupleField=14650520, conn=00DF3EA8 fetch_count=0, num_total_rows=1, num_fields=1, cursor='(NULL)' message='(NULL)', command='SELECT', notice='(NULL)' status=100, inTuples=0 --------------030207070707000001010405--