Wrox Programmer Forums
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 10th, 2007, 02:56 AM
Registered User
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help on DAO object problem


When using DAO object for to access MDB database I get errors. It's clear because something has to be included (imports) or added reference to my prog. For example:
Dim dbMyDB As DAO.Database
        Dim oDBEngine As DAO.DBEngine
        Dim rsMyRS As DAO.Recordset
        dbMyDB = oDBEngine.OpenDatabase("...\MyMail.mdb")
        rsMyRS = dbMyDB.OpenRecordset("Users", dbOpenDynaset)
I got: Name 'dbOpenDynaset' is not declared

If I write:

 Dim dbMyDB As Database
 dbMyDB = OpenDatabase("...\MyMail.mdb")

I got: Type "Database " is not defined.
       Name "OpenDatabase" is not declared.

Please help

Similar Threads
Thread Thread Starter Forum Replies Last Post
DAO yanis97 Java Databases 0 September 6th, 2006 10:37 AM
Object Reference Problem shaileshmark General .NET 3 July 22nd, 2004 04:13 PM
using DAO vubinhsg BOOK: Access 2003 VBA Programmer's Reference 2 July 22nd, 2004 08:46 AM
Getting at Access2000 with DAO - big problem Iblys Access VBA 1 September 25th, 2003 01:03 AM
Object Oriented VB6 programming and DAO warthog Pro VB Databases 0 June 19th, 2003 08:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.