Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT and STORED PROC. ON sql 7
Message
 
 
À
21/10/2002 03:41:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00713409
Message ID:
00713412
Vues:
19
Hi!

Try to do not use RaiseError command in SP, or prepare everything required for it. Accordingly to SQL Server help on RaiseError command, you require to create a custom error first, and then use RaiseError o raise that custom error.

HTH

P.S. this is more SQL Server topic than VFP...

>Hi everybody,
>
>I am having a problem with receiving results from SQL 7.
>
>
>On SQL server I have foloving stored proc:
>
>CREATE PROCEDURE validateEntry @field nvarchar(7)
>AS
>
>Select * from Table where x = @Field
>
>IF @@RowCount = 0
>BEGIN
> PRINT('Error, Entry does not exist')
> Raiserror ('Error, Entry does not exist', 16,1)
>END
>
>I cal this stored proc. FROM VFP6 via SPT:
>
>a = SQLEXEC(gnHandle,"validateEntry '12' ")
>if a = -1
> AERROR(aSQLError)
> IF aSQLError[1] = 1526
> MESSAGEBOX(aSQLError[2],"Error")
> ENDIF
>endif
>
>Problem is that I get in array instead message from Stored procedure
>message:
>
>Conectivity error. Unable to retrieve specific error information
>Driver is probably out of resurces.
>
>If I cal procedure with entry which exists, everything is OK
>
>Thanks in advance,
>
>Toni
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform