Solved

Creating ODBC driver database

Posted on 1998-07-15
2
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

729 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