Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CreateTableDef method to create shared linked tables 1

Status
Not open for further replies.

PaulCoop

Programmer
Apr 3, 2001
31
GB
I am using CreateTableDef method of CurrentDb to dynamically link a chosen table in a set of remote mdb databases. (There is one table in each of databases)

This appears to work except the linked table appears to linked exclusively. When someone else using their own copy of my database links to the same table in the same remote database I get an error saying that the file is in use.

The code is:

Set Temp_tbl = CurrentDb.CreateTableDef("xx_report_canvas_pcs", , "cache", ";DATABASE=" & path_cache & name)
CurrentDb.TableDefs.Append Temp_tbl
RefreshDatabaseWindow

Please note I am not using the constant dbAttachExclusive as the attribute.

I can not find any way to link these table in shared mode like my other statically linked tables. Is there a different attribute that will do this? The only ones I can find are read only.

Paul Cooper
 
Try this:

DoCmd.TransferDatabase acLink, "Microsoft Access", _
"C:\DBS\NWSales.mdb", acTable, "The name of the table"

Jean-Paul
Montreal
mtljp2@sympatico.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top