Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB6 - Declaration (VB6)

    Hi,

    I have with this statement in VB6

    Dim dbTest As Database
    Dim rsWorker As Recordset
    Set rsWorker = dbTest.OpenRecordset("worker", dbOpenDynaset)

    When executing the form, it prompts "type mismatch". Is there anything I missed? Thanks...

    chl88

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB6 - Declaration (VB6)

    Do you have references set to both DAO and ADO, or to ADO alone? Both DAO and ADO have recordset objects, and without specific declaration (Dim rst As DAO.Recordset) the object will be interpreted as belonging to the first model in the references list. You also don't indicate any code instantiating the database object, you just start trying to use it, which won't work.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Feb 2003
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB6 - Declaration (VB6)

    Thanks for the advise...

    chl88

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •