|
-
May 31st, 2011, 06:59 PM
#1
Thread Starter
New Member
Add a table to new database from existing one
Dear all,
I am creating a table in a database and am trying to put that table in a different database. I get an error 3367 "Object already exists in collection" Not sure what I am doing wrong. My code is:
Dim sFileName As String
Dim catThisDb As ADOX.Catalog
Dim catSource As ADOdb.Connection
Set catThisDb = New ADOX.Catalog
catThisDb.ActiveConnection = CurrentProject.Connection
Set tbl = New ADOX.Table
Set tbl = catThisDb.Tables("Yields")
Set catSource = New ADOdb.Connection
catSource.ActiveConnection = "Provider=Microsoft.JET.OLEDB.4.0;Data Source= C:\Clients\WF1.mdb"
catSource.TableDefs.Append tbl
Thanks,
D
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
|