Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases 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 June 12th, 2005, 07:57 PM
Registered User
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using VB6 SP2 to Open Access 2003 .mdb

I am having a heck of a time getting my VB6 SP2 application to Open an Access 2003 .mdb.

Code Snippet is

Dim db as database
Dim dbe as New DBEngine

 FileName = String$(255, 0)
    result = GetPrivateProfileString("DB", "Article", "", FileName,_
             55, iniFileName)
    FileName = Mid$(FileName, 1, result)

    Set db = dbe.OpenDatabase(Filename)

Old June 13th, 2005, 08:24 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there...

what kind of error are you using??
you need to use jet 4.0 to open it.. are you using dao or ado???



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aero glass in vb6 using win xp sp2 svharishtech Pro VB 6 2 July 7th, 2007 12:04 AM
Open mde or mdb access file from vb6 gorgo Pro VB 6 1 February 20th, 2006 01:39 AM
open Access report from VB6 submit Pro VB 6 7 December 6th, 2005 04:04 PM
How open a DOS-box from Access 2003 cvandijk Access VBA 1 January 31st, 2005 10:02 AM
COM access after WinXP SP2 Ned VB Components 0 August 30th, 2004 01:45 PM

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