×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

GET & SET

GET & SET

GET & SET

(OP)
When I do a verification of the existence of a value and then modified, do this:

TABLE:COD=X
GET(TABLE,TABLE:KEY)
IF ERRORCODE()
..
END
TABLE:COD=X
SET(TABLE:KEY,TABLE:KEY)
NEXT(TABLE)
TABLE:NOM='XXXX'
ACCESS:TABLE.UPDATE()

because I'cant GET to modify the data, but yes with the SET. At the same time, if I use the SET / NEXT then I can not corroborate the FIELD = VAR because always return yes!.

There is a more flexible working? Thanks.
 

RE: GET & SET

Hi!

1. You need to use a CLEAR(TABLE:RECORD) before a GET or SET to make sure that the record buffer is empty.

2. GET() will work ONLY is the Key is UNIQUE.

3. When you use SET(), you should ALWAYS check if the record key is the one you want before you update it i.e.

CODE

TABLE:COD=X
SET(TABLE:KEY,TABLE:KEY)
NEXT(TABLE)
IF NOT ERRORCODE() AND TABLE:COD = X
   TABLE:NOM='XXXX'
   ACCESS:TABLE.UPDATE()
END

Regards
 

RE: GET & SET

(OP)
Thanks Shan!! very much.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close