Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update record in Access Table
Message
 
À
21/01/2008 02:37:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01283533
Message ID:
01283548
Vues:
13
>Dear Experts
>
>I use following commands to save/insert records in access table
>
>public myconnection
>myconnection = sqlstringconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\asoft\db1;Uid=admin;Pwd=")
>* db1 is mdb name
>sqlexec(myconnection,"select * from table1", 'cursor1')
>
>*To save record
>fld1=thisform.text1.value
>fld2=thisform.text2.value
>fld3=thisform.text3.value
>fld4=thisform.text4.value
>
>myinsert="insert into table1 (sno,name,phone,city) values(?fld1,?fld2,?fld3,?fld4)"
>&& table1 is table name in db1.mdb
>
>Now I want to edit/update record1, what codes should I use?
>The primary key is on sno field.
>Please help

Almost the same
TEXT TO myUpdate PRETEXT 15
     UPDATE table1 SET [name]  = ?fld2,
                       phone = ?fld3,
                       city  = ?fld4
     WHERE sno = ?fld1
ENDTEXT
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform