Solved

Adding a USER DSN on ODBC32  for Access 97 on the fly

Posted on 1998-05-11
2
165 Views
Last Modified: 2013-11-13
Adding a USER DSN on ODBC32  for Access 97 on the fly:


Went to Microsoft  looked up VB5 code for Adding a DSN and found code, but there example is for SQL and this did not work.    Now what?
0
Comment
Question by:Chizl
2 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 400 total points
ID: 1445905
Chizl,

Try the following:

DBEngine.RegisterDatabase "MyDSN", "Microsoft Access Driver (*.mdb)", True, "DBQ=c:\test.mdb;"


Best regards
Bin Huwairib
0
 
LVL 4

Author Comment

by:Chizl
ID: 1445906
We tried that, but there is more too it for what we are doing..   We found a sollution though.    We are using WISE installation software.   We just copied the registry for HKEY_CURRENT_USER\SOFTWARE\ODBC\ with the Access 97 and HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\  with the Access 97 portion into our Setup and it works perfectly..  So I'm going to go ahead and give you the points for just a quick response.    :)  

Your Welcome..
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question