Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto-Increment Keys and LOCAL VIEWS
Message
De
08/10/2004 01:39:26
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00949619
Message ID:
00949798
Vues:
7
Hi
You can try:
EXECSCRIPT('afields(aColumns,[base_table]])'+CHR(13)+'nNextId=aColumns[1,17]'+CHR(13)+'RETURN nNextId')
as default value for autoincrement column in view. But is not reliable.

I believe that the old style is better for local views.

Interbase/Firebird generators are much better in this respect.

>Hello All,
>
>I've got a mentoring client who is having a problem with LOCAL VIEWS and auto-increment fields in VFP 8. Since I haven't worked with the auto-increment fields in VFP 8 yet, I come here looking for help!
>
>USE vCustomer NODATA && assume two fields PKID (auto-inc) and CompanyName
>CURSORSETPROP("Buffering",3)
>APPEND BLANK
>
>* At this point the PKID field in the view has 0 and that makes sense
>
>REPLACE CompanyName WITH "TakeNote Technologies"
>
>After a TABLEUPDATE(0) the parent table shows the new key value but the LOCAL VIEW does not. What is the best way to get that value into the LOCAL VIEW? Something like this?
>
>vCustomer.PKID = Customer.PKID
>
>Thanks!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform