Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass 2 SQL commands
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00764600
Message ID:
00767942
Views:
28
>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform