By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

help required

P: 21
i am not able to add records with the help of ADODB. what is the problem i am not able to understand please help me. this is the code i written

Private Sub Form_Load()
Set rs = New ADODB.Recordset
rs.LockType = adLockBatchOptimistic
rs.CursorType = adOpenKeyset
rs.ActiveConnection = cn
rs.Source = "select * from t"
rs.Open
End sub


Private Sub Command3_Click()
rs.addnew
rs.Fields(0) = Text1.Text 'text1.text is character type data
rs.Fields(1) = Val(Text2.Text) 'text2.text is number type data
rs.Fields(2) = Val(Text3.Text) 'text3.text is number type data
rs.Update
End sub

please solve my above code.
Apr 12 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.