Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UpdateNameList
Message
De
17/01/2003 04:50:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/01/2003 13:38:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00738407
Message ID:
00742784
Vues:
34
>Cetin,
>
>I tried what you suggested and it worked for updates and deletes.
>
>It doesn't work for inserts, however. Is it possible to make an SPT cursor updatable and have it do inserts also? Or am I doing something wrong?
>
>Thanks,
>
>Gerry Newton

It works for inserts too. However all required (not null) fields should be in UpdateNameList and UpdatableFieldList unless they have a default value. ie:(with SQL server pubs.authors)
SQLExec(handle,"insert into pubs.dbo.authors "+;
 " (au_id,au_fname,au_lname)"+;
 " values "+;
 " ('999-99-1234','Test','Name')")
* would fail 
* Phone and Contract doesn't accept NULL and only phone has default value

SQLExec(handle,"insert into pubs.dbo.authors "+;
 " (au_id,au_fname,au_lname,contract)"+;
 " values "+;
 " ('999-99-1234','Test','Name',1)")

*would succeed
*Same with UpdatenameList and UpdatableFieldlist
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform