|
-
Jul 5th, 2000, 04:30 AM
#1
Thread Starter
Addicted Member
I have managed to create a linked table between two access databases using standard DAO techniques.
I have a minor problem, I want to link a table from one database to another database that has a table of the same name. In which case i want to rename this link table to something else.
Does anyone know how to have the option of naming a linked table, so i don't get any naming conflictions.
Any Ideas!
Mark
-
Jul 5th, 2000, 05:30 AM
#2
What are linked tables that you are talking about?
And why do you need linked tables between two databases?
-
Jul 5th, 2000, 06:10 AM
#3
Thread Starter
Addicted Member
Thanks
That was help???
I have been using dao as below
Sub Main()
Dim dbsSource As Database
Dim dbsDest As Database
Dim daotdflink As TableDef
Dim sLinkHeader As String
sLinkHeader = ";DATABASE="
Set dbsDest = OpenDatabase("C:\windows\desktop\dest.mdb")
MsgBox ("hello")
Set daotdflink = dbsDest.CreateTableDef("traffic")
daotdflink.Connect = sLinkHeader & "C:\windows\desktop\source.mdb"
daotdflink.SourceTableName = "traffic"
dbsDest.TableDefs.Append daotdflink
End Sub
To create a linked table. I want this table to be named differently in my destination database. The source database table i want to link to is called "traffic" but i want to call the linked table in my destination database LINK_traffic.
Any ideas of how to choose a name for the linked table.
-
Jul 5th, 2000, 05:59 PM
#4
Lively Member
The CreateTableDef method controls the name of the new table you're making, so you can call it whatever you want, like this:
Code:
Set daotdflink = dbsDest.CreateTableDef("LINK_traffic")
By the way, a lot of the answers to the questions you're asking in these forums can be easily found in the on-line documentation for VB or Access. You might want to read up on some of this stuff.
And you're welcome for the table linking code. No need to say thanks or anything.
-JoeyCode
-
Jul 7th, 2000, 08:16 AM
#5
Oops!
Icemanmt78, my reply was not meant to be of help to you, as I know almost nothing about the linked tables you discussed. I am sorry if I disappointed you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|