Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,560 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,908 people online right now. Registration is fast and FREE... Join Now!




object not found error

 
Reply to this topicStart new topic

object not found error, ADO using code

vaishnavi
13 May, 2008 - 06:30 AM
Post #1

New D.I.C Head
*

Joined: 10 May, 2008
Posts: 2

hi, when i run the following code, an error arises when i click the save button, it asks for an object to be mentioned. The code is as follows:
CODE


Private Sub Form_Load()
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\My Documents\vaish vb\vaish.mdb;"

rs.Open "select Name,Age from dbagain", db, 3, 3

End Sub

Private Sub cmdsave_Click()
rs.AddNew
rs("Name") = name_text.Text
rs("Age") = age_text.Text
rs.update

End Sub



can anyone please guide me abt this?? smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:32PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month