Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass 2 SQL commands
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00764600
Message ID:
00767942
Vues:
27
>Sergey,
>I found if I use the same type of 2 commands for one SQLEXEC command will return no problem, but if I use different command type, will return error "1463=No result set has been returned by the server." such as one for "Select..." and one for "Update..."
>for example:
>_success = sqlexec(_myconn,"select top 1 inv_no from autogen; update autogen set inv_no = inv_no + 1","autono")
>error will be returned, but changes can still be updated to the SQL table.
>is there any other method to avoid this error?
>thanks in advance.

I don't get this error when I run your commands. Anyway, try to change it a little bit so yuo can get result with one UPDATE command
lcSql = "DECLARE @inv_no int update autogen set @inv_no = inv_no, inv_no = inv_no + 1 SELECT @inv_no"
success = sqlexec(_myconn,lcSql, "autono")
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform