Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Number/ SEEK() / Edit Mode
Message
From
13/09/2002 13:35:31
 
 
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:
00700273
Views:
6
John,

You would be better off if every record had a unique primary key, that never changes (and that is meaningless). That would be better than using recno(). Anyway, try this:
lccode = table1.lcCode
SELECT recno() as recno,* from table1 where ccode = lcCode ;
    into cursor temp1Cursor
if _tally > 0
   * record(s) were found
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,
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform