Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement
Message
De
02/07/2003 01:35:59
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
SQL Statement
Divers
Thread ID:
00805961
Message ID:
00805961
Vues:
63
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform