Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote view - how to detect errors

Status
Not open for further replies.

mkrausnick

Programmer
Apr 2, 2002
766
US
If I use SQL passthru, I can check the return value from SQLEXEC(), and if less than zero, I can call AERROR() to find out what went wrong.

How do I accomplish that if I'm doing inserts, updates, and deletes using remote views?

Thanks,

Mike Krausnick
Dublin, California
 
Check the return value from your tableupdate and then you can use message() and aerror.

Jacob Bruner
HCI
 

Mike,

You need to do something like this:

Code:
SELECT MyView
IF NOT TABLEUPDATE(0, .F.)
  AERROR(laError)
  IF laError(1,1) = 1525
    * Server reported an error
    MESSAGEBOx(laError(1,3))  && display error message
  ENDIF
ENDIF

Obviously, you can flesh this out according to your needs.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
OK, I'll give that a try, thanks!

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top