Having trouble executing a batch using sql pass through 
Author Message
 Having trouble executing a batch using sql pass through

I am trying to execute a large batch using the SQL Pass Through
functions connecting to SQL Server 6.5.  Inside the Batch it has it's
own error handling routines, however if sql server reports any type of
error I get no result sets.  To better explain myself, here is some
sample code to show what I am talking about.

m.pcString = " set nocount on " + ;

varchar(255) " + ;
                     " BEGIN TRANSACTION  " +;

'BatchTest' " +;

                     " begin " +;
                     "   rollback transaction " +;

                     " end " +;
                     " else " +;
                     " begin " +;
                     "   commit transaction " +;

                     " end "
cMyCursor = createobject('cursor')
SQLPREPARE(m.pnConnHandle, m.pcString)
i = SQLEXEC(m.pnConnHandle) &&, m.pcString, 'cMyCursor')

If execute the same batch through ISQL, I get a result set even though

and the result set.  However, when this code is ran through VFP, I get
no result sets.  All I get is the error message in the AERROR() array.
Is there a way to get around this behavior, I really need those result
sets for debugging purposes?

Mon, 02 Jul 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Having trouble Executing a batch with SQL PassThrough

2. Executing a Batch SQL File

3. I'm having trouble using the same table in two forms

4. updating remote SQL data using SQL pass-thru

5. SQL Server Connection Problem using SQL Pass-Through

6. How to execute a batch file from FoxPro!!!

7. Passing a batch file variable to a VFP prg

8. Having trouble updating a 1-Many child browse.

9. Having trouble opening a database obtained from GETFILE command

10. Having trouble with SET PRINTER TO

11. Still having trouble with INSERT INTO

12. Foxpro 2.6 for Mac having trouble launching----HELP


Powered by phpBB® Forum Software