J
Jiøí Pa¹ek
I have two access databases secured with one workgroup file. In first
database (client) are only forms,reports, ... , in second (data) are only
tables.
When user open and logon in first (client) database i want link all tables
in second db (data) as a logged user with ADO, but i couldn't open
connection to second db because i don't know in code current user's
password.
If i know all table names in second db i can link tables :
Dim Cat As New Catalog, Tbl As New Table
'for each table in second db ...
Cat.ActiveConnection = CurrentProject.Connection
Tbl.Name = LocalTableName
Set Tbl.ParentCatalog = Cat
Tbl.Properties("Jet OLEDB:Create Link") = True
Tbl.Properties("Jet OLEDB:Link Datasource") = DBPath
Tbl.Properties("Jet OLEDB:Remote Table Name") = RemoteTableName
Cat.Tables.Append Tbl
and everything works fine
but if i didn't know table names, couldn't get its list :-((
any suggestions ? thanks
database (client) are only forms,reports, ... , in second (data) are only
tables.
When user open and logon in first (client) database i want link all tables
in second db (data) as a logged user with ADO, but i couldn't open
connection to second db because i don't know in code current user's
password.
If i know all table names in second db i can link tables :
Dim Cat As New Catalog, Tbl As New Table
'for each table in second db ...
Cat.ActiveConnection = CurrentProject.Connection
Tbl.Name = LocalTableName
Set Tbl.ParentCatalog = Cat
Tbl.Properties("Jet OLEDB:Create Link") = True
Tbl.Properties("Jet OLEDB:Link Datasource") = DBPath
Tbl.Properties("Jet OLEDB:Remote Table Name") = RemoteTableName
Cat.Tables.Append Tbl
and everything works fine
but if i didn't know table names, couldn't get its list :-((
any suggestions ? thanks