Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What does SQLEXEC() return after an UPDATE... command?
Message
From
16/10/2004 13:12:37
 
 
To
16/10/2004 08:28:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00951936
Message ID:
00951953
Views:
11
>I do an UPDATE command using SQLEXEC.
>I *know* that the conditions specified (WHERE clause) cannot be matching, yet I seem to be getting a "1" back (updating only 1 record each call). The record is *NOT* being updated, which is what I want, but the return code is telling me to update a list that is shown to the user to indicate records updated.
>
>The Help says:
>"Numeric data type.
>SQLEXEC( ) returns the number of result sets if there is more than one. SQLEXEC( ) returns 0 if it is still executing and returns 1 when it has finished executing. SQLEXEC( ) returns –1 if a connection level error occurs.

>
>SO what does it return after an UPDATE command? I had guessed that it would return the number of records updated but that is obviously wrong.
>
>Thanks
>Jim

Hi Jim,

it return only ODBC result status or the number of the

This is corrected because, if they stir UPDATE/delete/select/insert in a single one batch the returned number would have to be not ambiguous.

But this is not true partially:
UPDATE .... && update 10 rows
return 1
UPDATE .... && update 10 rows with a trigger
SELECT .... && refresh the client cursor
return 1 ?
UPDATE .... && update parent row with a trigger
UPDATE .... && update 10 rows with a trigger
SELECT .... && refresh the parent cursor
SELECT .... && refresh the cursor
return 2 ?

Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform