Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
From
02/07/2003 01:35:59
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
SQL Statement
Miscellaneous
Thread ID:
00805961
Message ID:
00805961
Views:
62
Hi all,

I have the following code and send it to the SQL Server as batch :

Dim loCMD As New ADODB.Command
Dim loRS As New ADODB.Recordset
loCMD.ActiveConnection = CN
loCMD.CommandText = "INSERT INTO tableA (field1) VALUES ('valueabc');" & _
"SELECT field1 FROM tableA;"
loCMD.Cancel
Set loRS = loCMD.Execute

After this command ran, the 'valueabc' have been inserted into 'tableA', but it would not return the query "SELECT field1 FROM tableA;" to client side, I have tried to put 'GO' between this 2 command, but it doesn't work, I think 'GO' command only allow in stored procedure.

So, is there any way can return the query in a batch process, or I have to do it into 2 times?


Thanks
Aston
Next
Reply
Map
View

Click here to load this message in the networking platform