Bruce:
The following KB articles shows how to link an external table. The sample
code shows how to check for the existence of an existing table, as well as
link to an external table. This sample code uses DAO as opposed to ADO.
http://support.microsoft.com/default...b;en-us;159691
--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com
This response is supplied "as is" without any representations or warranties.
"Bruce Lawrence" <dgr8koolaid@hotmail.com> wrote in message
news:1130277635.939362.137090@o13g2000cwo.googlegr oups.com...
I have an Access97 database and I would like to link a SQL table to it
without having to create a manual ODBC connection on every system that
needs to use this database.
This is what I have so far to make the ODBC connection:
Dim DBconnect As Object
Dim CnnStr As String
CnnStr = "Provider=sqloledb;" & _
"Data Source=servername;" & _
"Initial Catalog=odbc-connection-name;" & _
"User ID=username;Password=;"
Set DBconnect = CreateObject("ADODB.Connection")
DBconnect.ConnectionString = CnnStr
This code works fine to create the connection. What I need now, is the
code to create the actual link to the "openord" table in the "proddata"
database on that SQL server.
I guess it would be a good idea to check to see if the table exists and
if it does to skip the link connection. Otherwise it may give an error
that the link is already there?
Thanks for any help !