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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only