Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 September 25th, 2003, 12:57 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting at Access2000 with DAO - big problem

Hi all, this is my first post. I am very frustrated with Microsoft Visual Studio 6 - Visual Basic, I am trying to use DAO to talk to a database that was created with Access 2000 and am having no luck. I have the latest service packs for Office and for Visual Basic and Jet and everything like that, but the code still isn't working.

The database file has a system DSN of "lsdata" and I have tried referring to it using both the DSN and the full path.

Basically what I'm trying to do is to open the database using ODBC so that I can change the structure of it using DAO. I was able to get it to work using SQL but I need more control (you can't add autonumber fields using SQL).

Here is the code:
'First I do this
Dim TheDatabaseThingy as Database
'And I have tried both of these
Set TheDataBaseThingy = OpenDatabase("lsdata", dbDriverCompleteRequired, False, "ODBC;UID=;PWD=;DSN=lsdata")
'or
Set TheDataBaseThingy = OpenDatabase("C:\Program Files\Microsoft Visual Studio\VB98\Connexions Project\Connexions Databases\50.mdb", False, False, "ODBC;DSN=lsdata")

Both "Set" statements return run time error 3423 which has me greatly puzzled. We have tried exporting it as an earlier version of access, and then we got error 3170.

I am tearing my hair out, any help would be appreciated.


 
Old September 25th, 2003, 01:03 AM
Authorized User
 
Join Date: Sep 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Calm down, this is a known problem with VB6, it works with access 97. Try this first.

I hope that it's not too late for your hair !!!




Bassam





Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a big problem in VB 2005 !!!! aeroboy32000 Visual Basic 2005 Basics 3 October 24th, 2007 09:40 PM
facing big problem Manish Malhotra Classic ASP Basics 1 June 19th, 2006 01:35 PM
Big problem with VB + MSDE 7 predal Pro VB 6 2 April 2nd, 2004 03:44 AM
DAO Run Time Error 3423 - VB6 to Access2000 Iblys Access 1 September 25th, 2003 09:31 PM
problem with connecting asp with ms-access2000 ravinkumar Classic ASP Databases 2 September 12th, 2003 05:23 AM





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