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

Error Code 429

Status
Not open for further replies.

mrholtsr

Programmer
Dec 3, 2001
18
US
I am trying to learn Visual Basic using Visual Basic 5 professional given to me by my son. I am using the Teach Yourself Database Programming with Visual Basic 5 by Sams Publishing. Can someone look at the following code and tell me why I receive the followith message: Error Code 429: Active X component cannot create object and when I clik on the debug option it highlights this line of code: Set db = DBEngine.Open Database(strDBName. The entire code is as follows:
Option Explicit

Private Sub Form_Load()
'
' creating Dynaset - type recordsets
'
Dim db As Database ' the database object
Dim rs As Recordset ' the recordset object
'
' creat local variables
Dim strDBName As String
Dim strRSName As String
Dim intRecs As Integer
'
'initialize the variables
strDBName = App.Path & "\source\data\books5.mdb"
strRSName = "Titles"
'
' create the objects
Set db = DBEngine.OpenDatabase(strDBName)
Set rs = db.OpenRecordset(strRSName, dbOpenDynaset)


End Sub
Thanks for your help, Ray Holt
 
Have you added a reference to ADO or your chosen data access method.

Go to tools->references and add a reference to ADO and the code should be fine.

Cheers
 
Since the code shown is DAO code not ADO, you would do better to add a reference to the DAO library


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
If the DAO reference was missing wouldn't the code fail on the DIM db as database.

I suspect some of the Jet Dlls are missing, If you are running Windows2000 apply SP3 if not already done.

Otherwise can you post what o/s and service packs and MDAC versions you are running ?
 
I am running VB 5 with Windows XP. The version was given to me by my son. I can't afford to upgrade to VB.Net. I am trying to learn to use VB. One thing I have noticed is that when I highlight db in the set db line it tells me that db = nothing. This is also true when I highlight the rs in the set rs line. I have opened the only ADO library that is in the reference file and all the DAO references that I can fine. Thanks for all the help and I hope you can still help. Ray Holt
 
I have discovered the problem, I think, but don't know how to fix it. When I place the cursor over the set command and double clik and ask for the definition it tells me that the identifier under the cursor is not recognized. When I place the cursor under db it says db=nothing. Please help. Ray Holt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top