Solved

Creating ODBC driver database

Posted on 1998-07-15
2
169 Views
Last Modified: 2012-05-04
I am looking for code to create an ODBC database.  I do not want to create a database and then go into Control Panel in Windows to create an ODBC connection.  I need a way to create a database and then create ODBC connection within  code.   I know how to create a non-ODBC database, but I need to make an ODBC connection to MS Access in code.
0
Comment
Question by:newyorker
2 Comments
 
LVL 2

Accepted Solution

by:
seahpc earned 100 total points
ID: 1465845
Try this

Public m_rdoConn As rdoConnection
Public m_rdoErr As rdoError
Public m_rdoResult As rdoResultset
Public m_rdoEnv As rdoEnvironment
Public m_rdoCol As rdoColumn

Set m_rdoEnv = rdoEnvironments(0)
Set m_rdoConn = m_rdoEnv.OpenConnection(dsname:="", _
                prompt:=rdDriverComplete, _
                Connect:="uid=sa;pwd=zaq12wsx;driver={SQL Server};" _
                & "server=Auc_s2_Central;database=Auction;")
0
 
LVL 1

Expert Comment

by:JayMerritt
ID: 1465846
FYI - This is called a DSN-LESS connection.  It does not require an ODBC entry.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now