Please help - simple VB 4.0 DB programming question 
Author Message
 Please help - simple VB 4.0 DB programming question

Someone please help...
I have the following code which is in Teach yourself Database
Programming with VB 4 in 21 days.
I have VB 4.0 Professional and it won't let me run this.  It gives me
User Defined Type Not Defined
on the statement "Dim dyn1 as dynaset"
Note: I do have both VB 4.0 and VB 4.0 Professional installed, but I am
100% sure that I am running the Professional Version.  - Splash screen
says Professional.

Private Sub Form_Load()
    Dim dat As Database
    Dim dyn1 As dynaset
    Dim dyn2 As dynaset

    Dim cDbName As String
    Dim cRecSource As String
    Dim nRecs As Integer
    Dim cFilter As String

    cDbName = App.Path + "\books.mdb"
    cRecSource = "Titles"
    cFilter = "[Year Published]>1990"

    Set dat = OpenDatabase(cDbName)
    Set dyn1 = dat.CreateDynaset(cRecSource)

    dyn1.MoveLast
    nRecs = dyn1.RecordCount
    MsgBox cRecSource + " :" + Str$(nRecs), 0, "Total Records in Set"

    dyn1.Filter = cFilter
    Set dyn2 = dyn1.CreateDynaset()
    End

End Sub



Thu, 28 Sep 2000 03:00:00 GMT  
 Please help - simple VB 4.0 DB programming question

Hi!

Dynaset isnt a datatype. Recordset is the Datatype you rare looking for.
Dynaset is a type of recordset.

Besides, use that book to start fire and look for another one.

Michael Patron




Thu, 28 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Good, simple, robust VB DB programming examples, please?

2. Good, simple, robust VB DB programming examples, please?

3. SIMPLE SIMPLE ListView Question. Please help

4. Please help...Simple VB/DLL question.

5. PLease help Newbie - Simple question for all you VB Gods:)

6. VB 4.0 16-bit Application Question - Please help!

7. VB 4.0 16-bit Application Question - Please help!

8. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

9. Simple Drag and Drop question for VB 4.0

10. Simple DB Question in VB

11. gwbasic simple programming help, Please!!!

12. Some simple BASIC programming help, please.

 

 
Powered by phpBB® Forum Software