By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,282 Members | 1,648 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,282 IT Pros & Developers. It's quick & easy.

Linking tables with SQL

P: n/a
Hello

Using an SQL I can create a table

Example:

SQL = "CREATE TABLE Table1 (Field1 TEXT);"

Db.Execute SQL

Is it possible using an SQL to create a link to a table in another database?

ThanksG Gerard
Dec 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I've done it by creating a Database object and setting it to that
Database.

We have a database that constantly updates and forces the new version
of the front end to be downloaded every time it is opened. So I do all
my test code in a seperate database with a Database object that points
at that database. I query all my tables from there and then when I'm
ready to launch I load my code and forms into that database and then
load it to the server.

Code:
public sub useAnotherDB()
dim db as Database
Const LOC = "path to your database.mdb"
Set db = OpenDatabase(LOC)
' do stuff here
Set db = Nothing
end sub

Cheers,
Jason Lepack

G Gerard wrote:
Hello

Using an SQL I can create a table

Example:

SQL = "CREATE TABLE Table1 (Field1 TEXT);"

Db.Execute SQL

Is it possible using an SQL to create a link to a table in another database?

ThanksG Gerard
Dec 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.