Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Raising Error in SQL Server
Message
De
21/01/2004 15:22:16
 
 
À
21/01/2004 14:20:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00869151
Message ID:
00869198
Vues:
29
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform