DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Posts
    94

    I cann't open a database file with Access

    hi,I want to open the database file with Access.I have referBut it is failure.I use following:
    Dim varCONN As New ADODB.Connection
    varCONN.Provider = "Microsoft.Jet.OLEDB.3.51"
    varCONN.ConnectionString = "User ID=admin;Data Source=" + App.Path + "\Note.mdb"
    varCONN.Open
    That error message is "Unknow database formate for file Note.mdb......".
    I don't understand it. Thanks a lot.
    xuliangchu

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,649
    What version of Access are you using?

    Connection objects should be declared, and used, as follows:
    Code:
    'Not
    Dim varCONN As New ADODB.Connection
    'but, rather as
    Dim varCONN As ADODB.Connection
    Set varConn = New ADODB.Connection
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 12-19-2000, 03:14 PM
  2. Replies: 0
    Last Post: 12-11-2000, 02:32 PM
  3. Replies: 3
    Last Post: 08-04-2000, 06:07 AM
  4. Replies: 0
    Last Post: 04-17-2000, 01:33 PM
  5. Replies: 0
    Last Post: 04-17-2000, 01:29 PM

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