
ADO Command object and MSShape commands
I am using a Shape command to build a data report. I am
using a command object to set the commandtext (the shape
command) and parameters (there are two) and then to
execute to create a resulting recordset for the data
report. There is one grouping the the hierarchial
command. This runs great for Oracle. However when
running against SQL Server I keep getting an error every
time I try to execute the command for SQL Server:
"Connection is busy with results for another hstmt"
I know I have the command and connection object set up
correctly of it would not run for the Oracle database.
Here is the shape command:
SHAPE {SELECT DISTINCT GSUSER, RPT_TYPE FROM Z_REPORT
WHERE (GSUSER = ?) AND (RPT_TYPE IN ( ? ))} AS
IntegrityReportGroup APPEND ({SELECT Z_REPORT.* FROM
Z_REPORT ORDER BY ROWSERIALNO} AS IntegrityReportDetail
RELATE 'GSUSER' TO 'GSUSER','RPT_TYPE' TO 'RPT_TYPE') AS
IntegrityReportDetail
The second parameter may be one or more and I have the
code programmitically adding additional ?'s as needed.
Again, this works great in Oracle.
Any ideas what I need to do to get this shape command to
run under a command object for SQL Server?
Thanks,
Cammy