Help with book (Visual Basic 4 Databse How To) 
Author Message
 Help with book (Visual Basic 4 Databse How To)

I'm having trouble working through the examples in the book "Visual
Basic 4 Database How To"  published by Waite Group Press.

The first few examples using the data control were fine but from
chapter 1.6 onwards where the examples use data access objects, I
can't seem to get any to run. I'm using VB4 16bit and Windows 95.

They bring up the following error when opening the database

"Class doesn't support OLE automation"

This is the offending code from chapter 1.6:

Private Sub Form_Load()
    Dim dbName As String
    Dim db As Database

    On Error GoTo LoadError

    ' Get the database name and open the database.
    dbname = "G:\VB\BIBLIO.MDB"                                        
    Set db = DBEngine.Workspaces(0).OpenDatabase(dbName)

    ' Open the recordset.
    Set rs = db.OpenRecordset("Titles", dbOpenTable)

    If rs.RecordCount > 0 Then

        ' We have at least one record, so display the values of the
first
        ' record in the recordset in the controls on the form.
        DisplayRecord

    Else

        ' An empty recordset, so display an explanation, then
terminate.
        MsgBox "There are no records in the Titles table.", vbCritical
        End
    End If
Exit Sub

LoadError:

    ' An error was generated by Visual Basic or the Jet engine.
    ' Display the error message and terminate gracefully.
    MsgBox Err.Description
End

End Sub

Also most of the projects use a function which reads a file called
VB4DBHT.INI and returns the fully qualified filename of biblio.mdb.
Well that would be fine if VB4DBHT.INI existed anywhere on my drives
or on the CD, but it doesn't!!!!  I'm new to VB4 and would appreciate
some help from anyone who's tried these examples or who at least knows
what the hell is going on. I've gained a few grey hairs in the last
few days!!!!

Thanks



Sun, 07 Feb 1999 03:00:00 GMT  
 Help with book (Visual Basic 4 Databse How To)

John,

Check out Waite's Web page.  At
http://w3.waite.com/waite/vb4dhtfix_gif.html there is an article
explaining some problems they found in the CD after it went to press.

Hope this helps,


Quote:
>I'm having trouble working through the examples in the book "Visual
>Basic 4 Database How To"  published by Waite Group Press.

>The first few examples using the data control were fine but from
>chapter 1.6 onwards where the examples use data access objects, I
>can't seem to get any to run. I'm using VB4 16bit and Windows 95.



Mon, 08 Feb 1999 03:00:00 GMT  
 Help with book (Visual Basic 4 Databse How To)


says...

Quote:

>John,

>Check out Waite's Web page.  At
>http://w3.waite.com/waite/vb4dhtfix_gif.html there is an article
>explaining some problems they found in the CD after it went to press.

>>I'm having trouble working through the examples in the book "Visual
>>Basic 4 Database How To"  published by Waite Group Press.

I have found MANY little errors in this book. But it is a great way to learn
about Windows DLL's.
Gary


Wed, 10 Feb 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. compacting access databse via visual basic code

2. Visual Basic Databse Questioin

3. compacting access databse via visual basic code

4. visual basic 5 books- help needed!!

5. HELP! Visual Basic Books

6. FS: Visual Basic/Visual C++/Computer books 1/2 cover price

7. FS: Visual Basic 5 books and Visual Studio 5 Enterprise software -- cheap

8. FS: Visual Basic 5 books and Visual Studio 5 Enterprise software

9. Sports facility booking databse

10. Books to learn VB for Databse programming

11. Are there good books on Visual Basic?

12. Visual Basic book reviews

 

 
Powered by phpBB® Forum Software