Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Number/ SEEK() / Edit Mode
Message
 
 
To
13/09/2002 13:21:33
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00700262
Message ID:
00700270
Views:
12
You could use a SQL to see if the code exists:
SELECT COUNT(*) KOUNT FROM MYTABLE WHERE CCode = ?cCCode INTO CURSOR crsTemp
IF crsTemp.Kount = 1 [or 0 if the editied record is optimistically buffered]
   * Then there is no other record with that code
ELSE
   * disallow the change
ENDIF
>How may I return the record number after a SEEK(), INDEXSEEK() or the alikes, withour moving to that record?
>
>For example:
>
>I wish to allow the "ccode" to be changed in a file in "edit" mode.
>I would like to search for the new "ccode" entered against the file and if found, would like to compare record number of the found record against the curenct record number being edited. If they are the same I wish to allow the edit, but if they are different I will not allow the "ccode" entered since it was previously created.
>
>Please note, I do not wish to move to the record once it is found since it triggers thing I wish not to be triggered!
>
>In "add" mode it is much simpler, I do not have to compare record numbers. If it is found when I perfrom the search, the new "ccode" being added will not be accepted!
>
>If there is a better method in acheiving this? I would appreciate other suggestions?
>
>Thanks in advace,
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform