Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace FoxPro Message with MyMessage
Message
From
11/03/2003 09:58:28
 
 
To
11/03/2003 09:49:47
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00764202
Message ID:
00764212
Views:
33
Hi,
Is it what you are looking for?
FORM.INIT()
USE mytable AGAIN SHARED IN 0
CURSORSETPROP("Buffering", 5, "mytable")

*--User key in data and press save button

SELECT mytable
LOCATE FOR cPrimary == lcMyPrimary
IF NOT FOUND()
    APPEND BLANK
    REPLACE cPRimary WITH lcMyPrimary
ENDIF

REPLACE field1 with var1 ;

*--Replace all fields

IF TABLEUPDATE(.T., .F., "mytable")
    MESSAGEBOX("Save OK")
ELSE
    AERROR(laError)
    DO CASE
    CASE laError[2] = 1884  && Uniqueness error
       TABLEREVERT(.T., "myable")
       MESSAGEBOX("your custom message!!")
    CASE ...
    ENDCASE
ENDIF
HTH
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Previous
Reply
Map
View

Click here to load this message in the networking platform