Linking tables via ADO?

Ö

Özden Irmak

Hi,

I'm linking tables from other access databases to my master access database
in run-time via ADO code. I can do it for databases which has no password or
workgroup file attached for them like this :

MyTable.Properties("Jet OLEDB:Link Datasource") = MySourcePath
MyTable.Properties("Jet OLEDB:Remote Table Name") = TableName
MyTable.Properties("Jet OLEDB:Create Link") = True

Does anybody has the proper code samples to link tables from databases which
has password or has a workgroup file attached to it?

Thanks in advance...

Özden
 
6

'69 Camaro

Hi, Özden.

You don't mention the object type for your "MyTable" variable, but I suspect
that it's an ADOX Table object. I've never tried using the Jet OLEDB
Properties for user-level security on an ADOX Table object, so I'm not sure
that they are even valid Properties for this object. However, for the
syntax that works just fine for an ADO Connection object, see the tip "How
to connect to an Access database with ADO after it has been secured with
user-level security" on this Web page:

http://www.Access.QBuilt.com/html/vba.html#UserLvlSecureADOCnxn

If the syntax doesn't work for your ADOX Table object, then you may want to
use the DAO library for a TableDef object, instead of the ADOX library.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a
message will be forwarded to me. Spammers are free to use my UNALTERED
reply E-mail address. I will *never* get those messages!)
 
Ö

Özden Irmak

Hi Gunny,

I can open the secured database via a normal connection but linked tables do
not work. I tried also linking from inside Access bu it didn't work unless
I join to the same workgroup, then it worked...

As I have to do it via code have 2 questions now :

1) How can I create a database via ADOX which has a workgroup file attached?

2) Do you have DAO sample code for tabledef object with linking to secured
databases?

Thanks in advance...

Özden
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top