community.borland.com

Article #25534: Select-Suspend procedure behaves differently via InterSolv-ODBC

Problem:
With InterBase select procedures (used with suspend), the 
InterSolv-ODBC driver behaves differently than expected.

Here is the result set(from employee.gdb) returned in WISQL:
----------------------------------------------------------

select * from get_emp_proj("8")

PROJ_ID 
======= 

VBASE   
GUIDE   
MKTPR   


execute procedure get_emp_proj("8")

PROJ_ID 
======= 
VBASE   

-------------------------------------------------------------

Here is the result returned via ODBC:

SQLExecDirect:
szSqlStr = "select * from get_emp_proj("8")", cbSqlStr = -3
Return:	SQL_SUCCESS=0

Get Data All:
"PROJ_ID"
"VBASE"
"GUIDE"
"MKTPR"
3 rows fetched from 1 column.

SQLExecDirect:
szSqlStr = "execute procedure get_emp_proj("8")", cbSqlStr = -3
Return:	SQL_SUCCESS=0

Get Data All:
"PROJ_ID"
"VBASE"
"GUIDE"
"MKTPR"
3 rows fetched from 1 column.

The misbehavior here is when execute procedure or 
{call procxxx} is ran via InterSolv-ODBC, the suspend 
seems is ignored. 

Solution:
Workaround is to call the procedure using select rather 
than execute procedure.

Last Modified: 26-OCT-00