CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2000
    Location
    Germany / Bremen
    Posts
    25

    accessing Access

    Hi all Gurus,

    I hope you can help me...

    I have two Access-DBs.
    One with the program modules, the other with the data.
    The one with the data has a password, and all tables are linked to the one with the modules.
    This should be a Client-Server-Connection, so the position of the DBs could theoretically move.
    I want to re-link the tables in the module-DB, so I use this code:

    DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\QMS\data.mdb", acTable, Tables(I), Tables(I)



    The Problem: in the data-DB are around 30 tables, and for each one he asks for a password.

    my question: how can i set the password in the program code?

    thx,
    Tom


  2. #2
    Join Date
    Jul 2001
    Location
    Belgium
    Posts
    39

    Re: accessing Access

    I'm not that experienced but have you tried supplying a user name and password at the workspace level? It works for my ODBC connection and according to MSDN should work for other databases as well.


    set wrkMyWorkspace = CreateWorkspace("workspace", "uid", "password", dbUseJet")




    Please correct me if I'm wrong, I'm just learning VB



    If anything in this post makes sense it was written by me, if not I don't know who wrote it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured