Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recno Behaviour
Message
From
03/12/1999 23:55:26
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
03/12/1999 03:47:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00298320
Message ID:
00298600
Views:
24
>I have a table : Contracts
>
>In a form I have a button: Add
>
>
>Code of button Add:
>
>***
>
>SELE contracts
>APPE blank
>flush
>
>recnu=recno()
>
>thisform.pageframe1.page1.txtRate_sc.readonly=.f.
>thisform.pageframe1.page1.txtRate_ro.readonly=.f.
>
>thisform.pageframe1.page1.add.enabled=.f.
>thisform.pageframe1.page1.save.enabled=.t.
>
>thisform.pageframe1.page2.enabled=.f.
>thisform.pageframe1.page3.enabled=.f.
>
>go recnu
>
>thisform.pageframe1.page1.refresh
>thisform.refresh
>
>***
>
>However when I am trying to Input data in the fields txtRate_sc and txt_Rate_ro Fields are getting disabled, sice through experimenting with wait windows in buttons i found out that the recno() is jumping to EOF for some reason! ... ex. if a record was appended on 400 and I check what is the recno after I click on the Add button, i found that it is on 401!!! therefore Input can't be done!!
>
>can any one help me please?!!?!?!
>
>
>Thanx!!!

Do you have any code in either of the Refresh() methods you call at the end of your routine, that might move the record pointer?

You could use the Debugger and Watch the expression RECNO("Contracts"). As you step through your code, you'll be able to see exactly when the record pointer changes.

What table buffering, if any, are you using? Do you have an index order set on the Contracts table?

The FLUSH command is of very limited value these days. It can hurt performance if you force VFP to write all cached tables etc. out to the disk subsystem, just because you've appended a record to one of the tables.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform