Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-09-30 : 08:48:29
|
| Kumar writes "Hi,I am excuting a stored procedure of SQL2000 from VFP using SQLEXEC().This Stored Procedure (lets say usp_1) In turn calls another Stored (lets say usp_2)Procedure to Insert Records into the different Tables in a Database.sErrorStr = ""=SQLEXEC(nHandle,"EXEC usp_1 ?sErrorStr")Now usp_2 is passing a prameter (OUTPUT) to usp_1, which is the error number generated (if at all) by the insert statements (or 0 if none). I have used the @@ERROR immediately after every insert statements. usp_1 accepts this parameter passed by usp_2 and based on some logic passes the necessary output ( which is a string ) to VFP's output parameterWhat is happening is whenever there is a error in the usp_2 at the time of insert the whole procedure is terminated and the output of SQLEXEC() is -1. What i want is that it should return the error code to usp_1, which will then pass the necessary output to VFP's output parameter (sErrorStr).Please help...Kind Regards,KUMAR. " |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-09-30 : 08:58:44
|
| Some errors terminate the batch and there's npothing you can do about it.You can have an external client which can then obtain the eror from the connection but from within the connection you just have to live with the fact (and design for it) that you may get dumped without warning.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|