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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a database problem...

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
Is this the best way of connecting to a database, to insert files?

//CODE START
Tbl_Call_Rec.Insert;
Tbl_Call_Rec.Edit;
Tbl_Call_Rec.FieldByName('IMSI_Number').AsString:= Number;
Tbl_Call_Rec.Post;
//CODE END
 
It all depends on the type of database. You can use ADO, DBExpress, or the BDE. Since the BDE is not being updated, it's not necessarily the best choice even if you're using Paradox or xBase tables.

Give us some more info and someone will point you in the right direction.

-D
 
Agree with hify.
Whichever dataset flavour you end up with, call "insert" to create a new record and "edit" to edit an existing one. You don't need to call both.

Your call to "post" is correct, but if you omit it you will find that is it automated in most cases, e.g. a call of "Next" will do a Post if any data has been changed.

Have fun
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top