ODBC Connection

A

alex

ODBC Connection

Hello all,

Using Access ’03…

I’m trying to distribute an mde that utilizes an ORACLE table(s)
through an ODBC that has yet to be established (the first time
anyway).

I’ve done this many times, but always manually.

This do this manually, I go to:
File > Get external data > Files of type = ODBC
Under the machine data source tab > New > User Data Source
Select the Microsoft ODBC for Oracle Driver
And then provide the Data Source, User Name, and Server
And subsequently the password and table name to linked/imported

What I’d like to do in VBA is this (the same as above):

When the mde executes/opens:
Create a new data source using Microsoft ODBC for ORACLE
Set the Data source name, User Name, and Server
Then provide the password required to either link or import the table
(s)
Then provide the name of the table to link or import
Then link or import the table; all using VBA!

If I can do this, I’m not sure if the code should check to see if the
ORACLE driver has been installed (which it will be after the first
time). It may be just as quick to replace/install every time. As a
note, my mde is replaced every time the user opens the database.

There’s an article about this on Tech on the Net’s website, but it’s
not compete for what I need (I can’t set the driver manually):
http://www.techonthenet.com/access/questions/oracle_connect.php

As I’m writing this question, I’m also researching and discovering
that my manual method may not be the best way to accomplish this task
automatically with VBA (DSN vs DSN less). Some direction would be
helpful.

Thanks for any help,
alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top