954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

saving a record in the database using ADODB

dear brothers i have a problem in saving ma data in the database.so i need help thanks.

bashir matovu
Newbie Poster
6 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

what a problem? post your code friend and show the effort and you will get help from many people here :)

Estella
Junior Poster in Training
99 posts since Jan 2008
Reputation Points: 64
Solved Threads: 7
 

hera a sample code for saving

rec.Open (esql1), conn, adOpenDynamic, adLockOptimistic

rec!StudentNumber = txtSTUDID.Text


rec is your dim on adodb.recordset
conn if for dim on adodb.connection


rec!StudentNumber = txtSTUDID.Text

StudentNumber = the field name

txtSTUDID.text = saving the text inside the textbox


if this is not your prob then kindly post your code
or explain further whats your prob


chao..

hawisme000
Junior Poster
102 posts since Jul 2007
Reputation Points: 10
Solved Threads: 2
 

if you want to save the data then no need to open the record set at all.

Try using this sample code

'con is the adodb connection object
con.BeginTrans
con.execute "your insert or update statement here."
con.CommitTrans
debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You