Solved

Creating ODBC driver database

Posted on 1998-07-15
2
168 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

743 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

10 Experts available now in Live!

Get 1:1 Help Now