dao technique to add column to table in remote ULS db..

G

Guest

Can I (and if so, how?) pass id/password thru vba/dao so can add column to
Table in remote User level secured Back end database? (access 2000)?..

thanx!
don
 
W

Wolfgang Kais

Hello "nycdon".

nycdon said:
Can I (and if so, how?) pass id/password thru vba/dao so can add
column to Table in remote User level secured Back end database?
(access 2000)?..

If the backend database belongt to the frontend database that you
use, this should not be neccessary. To open another database:
Set wsp = DBengine.Workspaces(0)
Set dbs = wsp.OpenDatabase(...)

To use the same workgroup file but another user, don't use the
default workspace but create a new one:
Set wsp = DBEngine.CreateWorkspace("SecondWorkspace", "OtherUser", _
"OtherUsersPassword", dbUseJet)
Set dbs = wsp.OpenDatabase(...)

You cannot create a workspace as a user from another workgoup, since
the SystemDB property of the DBEngine object must be set before any
workspace is created. By opening a database in the UI of Access you
already create a workspace ("#Default Workspace#").

After opening the database you sould store a referenc to the TableDef
object of the desired table and add a new column to the table:

With dbs
With .TableDefs("Artikel")
.Fields.Append .CreateField("NewField", dbText, 50)
End With
End With
 

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