Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private DataSession Blues
Message
De
27/12/1999 10:35:31
 
 
À
27/12/1999 10:11:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00308757
Message ID:
00308767
Vues:
18
Hi John,

>How do I pass a reference to the private datasession to a method in my application class?

You can pass the ID:

oApp.NewKey(cTablname, Thisform.DataSessionID)

>oApp.NewKey(cTableName)

How do you use this? Does this method use a NextID or similar table that can get the NewKey without haveing the table? If so, you may think about doing the REPLACE or INSERT on the form, and have NewKey just return the new key, not actually populate it:

replace ID with oApp.NewKey(juststem(dbf(cTableName))) in (cTableName)

Then the datasession doesn't matter because you don't need to actually touch the field.

BTW, is this for a Primary Key in a table? If so, its usually handled in the Database Default Value for the field.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform