Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADD DATA TO MS-ACCESS

Status
Not open for further replies.

gmie

Programmer
Sep 6, 2001
29
MY
Hello guyss..

How to save/add data from TEdit into database MS-Access? What tools should I have?

For example, I got TEdit1 and TEdit2 and MS-Access field(Field1 and Field2).

So how to save text in TEdit1 into Field1 and TEdit2 into Field2.

Plz help me.
 
Maybe you can elaborate,

However from your information, why not just use a table with source set to the ACCESS DB table.

Add a TDBEdit for each field you want to update

and with extra DBNavigator to allow you to move between records.
 
Well..there somthing should I do with that TEdit that why I need it. So what the way to save tha data via TEdit.
 
try

open table
If not(ttable.active) the ttable open;
ttable.first;

locate the record you want to update (use locate or some similar function); see help
ttable.locate(keyfield,value to find,options);

ttable.edit;
ttable.fieldbyname(fieldname to put edit1).asString := TEdit1.Text;
ttable.fieldbyname(fieldname to put edit2).asString := TEdit2.Text;

TTable.post;

Is this what you want
 
Do you need some special kind of formatting on the field? Use the on validate event to modify the data in the bdEdit

Regards S. van Els
SAvanEls@cq-link.sr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top