Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving an empty cursor
Message
From
31/08/2001 09:29:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
31/08/2001 09:13:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00551332
Message ID:
00551352
Views:
16
>When I append blank to the cursor I have a positive recno() No?
>

If you use buffering, a newly appended record will have a negative recno(). When the record is saved with TableUpdate(), the permanent number will be assigend. According to the position in the table, of course; but before saving the record, VFP doesn't know where the record will be saved. Therefore the negative numbers.

>Yes but I have to get the next available nunber from the table that stores them. Before I can issue the TABLEUPDATE().

What number? The record number is assigned automatically. If you want to store a value to a field (primary key), you need a function for this. I will send you one, if you need it.

>They want to add a record. Then open the database and change the value in the primary index field of the tables. How do I get a cursor from the database that will have no records? I know with a view NODATA I think gets an empty view.

Do the users see the primary key? Or do you use surrogate keys? Your strategy will be different, depending on this point.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform