Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update record in Access Table
Message
 
To
21/01/2008 02:37:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01283533
Message ID:
01283548
Views:
12
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform