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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link table to User Level Secured Database

Status
Not open for further replies.

arryb

Programmer
Oct 27, 2003
27
GB
Help,

This is driving me mad.

I am trying to connect to a database using User Level Security.
i have the following code so far:

'reattach table from new database
Set tbl = db.CreateTableDef(NewTabName)
tbl.Connect = (";DATABASE=" & Directory & ";UID=RileyM;PWD=RileyM;")
tbl.SourceTableName = NewTabName
db.TableDefs.Append tbl

The code errors on the last line shown and produces an error along the lines of:
Could not read definitions; no read definitions for tblIcons.

Any ideas what the problem is. am i formatting the code incorrectly?

 
I think you may also need to reference the system.mdw file that the secured database uses. I can't really remember the syntax but it might be something like:
Code:
tbl.Connect = (";DATABASE=" & Directory & ";UID=RileyM;PWD=RileyM;SystemDB=C:\PathTo\MDWFile.mdw;")
Hope this helps.

[pc2]
 
Thanks,

However, it didn't work!
Still get the same error i'm afraid.
I will have a play to see if it is something along those lines.

If anyone can help further i would be very grateful?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top