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.comICQ #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.