Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Raising Error in SQL Server
Message
From
21/01/2004 15:22:16
 
 
To
21/01/2004 14:20:37
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00869151
Message ID:
00869198
Views:
30
Trey, I finally got it to work once I added the SET NOCOUNT ON as the first line in the SQL command. My command looks like this now:

------------------------------------------------
SET NOCOUNT ON
UPDATE FSFormulaAttrib
SET Attrib_Val = "JWTEST"
WHERE Formula_ID = 316206 AND
Attrib_Code = "JWMATCH"
IF @@ROWCOUNT = 0
BEGIN
RAISERROR ('No rows were updated',11,1)
END
------------------------------------------------

Now, for my next question: Is there any way to get MS SQL to return an error number in the 5th element of the AERROR() array? I'd like to assign an error message of something like 99999 so that I get that value back when I do the AERROR() function. I don't really want to store a message on the server using the SP_AddMessage function.

Jim White
Time is a wonderful teacher. Unfortunately it kills all of its students.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform