how to link tables from password protected access, help!

trumanrus

Member
Joined
Jun 13, 2005
Messages
6
Programming Experience
1-3
hi, i would like to ask how can i link a table from a password protected access db?, help! thanks!, my code below works fine if its not protected but it has to be protected, thanks.

strDBLinkTo = Application.StartupPath & "\dbprmain.mdb"
strLinkTbl = "e201"

catDB = New ADOX.Catalog()
cnn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB
biggrin.gif
atabase Password=123; Data Source=" & strDBLinkFrom)

catDB.ActiveConnection = cnn

tblLink = New ADOX.Table()

With tblLink
.ParentCatalog = catDB
.Name = strLinkTblAs
.Properties("Jet OLEDB:Create Link").Value = True
.Properties("Jet OLEDB:Link Datasource").Value = strDBLinkTo
.Properties("Jet OLEDB:Remote Table Name").Value = strLinkTbl
End With

catDB.Tables.Append(tblLink)
catDB = Nothing
 
Last edited by a moderator:
Back
Top