Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving an empty cursor
Message
De
31/08/2001 09:29:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
31/08/2001 09:13:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00551332
Message ID:
00551352
Vues:
15
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform