DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Jason Douglas Guest

    Connect access2000 to vb6


    I am trying to connect an access 2000 database to vb6. What is the easiest
    way to do it.

    Thank you in advance

    Jason

  2. #2
    Sanjiv Guest

    Re: Connect access2000 to vb6


    Hi Jason!!
    There are number of ways to connect to the Access
    Eg : Through DataControl ,Through an odject (Database object),ODBC ...etc.
    HOw would you like to connect.

    If you want to connect through a control then place the conrtol on the form
    and set its database properties according to your requirements.you nee to
    set (i)Database Name (ii)RecordSource

    If you want to connect through a object the nhere is the code:


    Dim wrkJet As Workspace
    Dim dbsNorthwind As Database
    Dim dbsPubs As Database
    Dim dbsPubs2 As Database
    Dim dbsLoop As Database
    Dim prpLoop As Property

    ' Create Microsoft Jet Workspace object.
    Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)

    ' Open Database object from saved Microsoft Jet database
    ' for exclusive use.

    Set dbsNorthwind = wrkJet.OpenDatabase("Northwind.mdb", _
    True)

    Hope This will serve your purpose.
    All the Best
    Bye
    Sanjiv


    "Jason Douglas" <jason.douglas@cwcom.net> wrote:
    >
    >I am trying to connect an access 2000 database to vb6. What is the easiest
    >way to do it.
    >
    >Thank you in advance
    >
    >Jason



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links