Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server RAISERROR function
Message
 
 
To
22/09/2004 12:01:03
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00945047
Message ID:
00945060
Views:
22
Hi Jim,


Deja vu? Re: Problem Raising Error in SQL Server Thread #869151 Message #869198

>I have the following query that I submit from VFP80 to MSSQL-2000.
>
> UPDATE Employees
> SET ReportsTo = 5
> WHERE ReportsTo = 2
>
> IF @@ROWCOUNT = 0
> BEGIN
> RAISERROR('No rows were updated',16,1)
> END
>
>
>As you can see I want to trap the condition of no rows updated with the IF @@ROWCOUNT = 0 clause. My problem is that when I submit this query from VFP using the SQLEXEC() command and if no rows were updated by the SQL command I get an ODBC error using the AERROR(ODBCError) function. The values in the ODBCError array:
>
> 1526
>
> Connectivity error: Unable to retrieve specific
> ERROR information. Driver is probably out of resources
>
> .NULL.
> .NULL.
> .NULL.
> .NULL.
> .NULL.
> .NULL.
>
>This doesn't seem right and I don't know if I should rely on this to determine that I had a problem or not. Am I doing something wrong or is there another way to do it?
>
>Jim White
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform