Thread: PostgreSQL ODBC driver error when returnning more than one query (wiht Visual Foxpro)
PostgreSQL ODBC driver error when returnning more than one query (wiht Visual Foxpro)
From
Jarosław Jankowski
Date:
I have PostgreSQL 7.3.1 on Cygwin, ODBC driver 7.03.01.00 and Visual Foxpro 7.0. When I calling function in VFP: _SQLREZ = SQLExec(_SQLCH,"SELECT * FROM oper; SELECT * FROM oper_grp;","oper") then in table "oper" have 4 rows and in table "oper1" have 2 rows (wrong), but in 'psql' (running on server) command: SELECT * FROM oper_grp; return 7 rows, and this is correct. Information from psqlodbc_???.log: conn=39006000, query='SELECT * FROM oper; SELECT * FROM oper_grp;' [ fetched 4 rows ] [ fetched 7 rows ] When I test other "double" queries retuning variable rows i see: Query from 2th SELECT produce incorrect number rows. Always is omited first # rows (# = first SELECT number rows + 1). When 2th SELECT produce less rows than is in first SELECT + 1 then table is empty (no any rows, but columns in table is correct). When I check in ODBC Setup -> DataSource -> "Use DECLARE/FETCH" then 2th Query is not execute. Command return only one result. When I check in ODBC Setup -> DataSource -> "Parse Statements" then table schema of 2th returned table is just the sam as first table and have no rows or VFP carsh. What I do wrong? Jaroslaw Jankowski Warsaw, Poland.