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
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