Access .mdb I want to import from has a password

Results 1 to 4 of 4

Thread: Access .mdb I want to import from has a password

  1. #1
    Tom R. Earlywine Guest

    Default Access .mdb I want to import from has a password

    I have a few tables I need to occasionally import to SQL from an Access .mdb file that has a password set on it. I'm trying to think through the project before I attempt it and haven't been able to find anything that mentions this. Is this going to be an issue? Is there a way to pass this password when using DTS or Stored Procedure?

  2. #2
    Join Date
    Dec 1969

    Default Looks to me... it&#039;s pretty easy:<BR><BR><BR><BR>On that page we see:<BR><BR>*** QUOTE ***<BR>This is an example of a query against an Excel spreadsheet through the OLE DB provider for Jet.<BR><BR>SELECT * <BR>FROM OpenDataSource( &#039;Microsoft.Jet.OLEDB.4.0&#039;,<BR>&nbsp; &nbsp; &nbsp; &nbsp; &#039;Data Source="c:Financeaccount.xls";User ID=Admin;Password=;Extended properties=Excel 5.0&#039;<BR>&nbsp; &nbsp; &nbsp; &nbsp; )...xactions<BR><BR>*** END QUOTE ***<BR><BR>Seems pretty easy to adapt that to an .mdb DB passing id and password and getting the right table, etc., etc.<BR><BR>Incidentally, I do *NOT* use SQL Server. I found that by just looking at the TSQL reference, finding the SELECT statement reference, linking to the FROM clause, from there to the detailed FROM info, from there to OPENDATASOURCE. About 3 or 4 minutes. The MS docs are really pretty easy to use, once you get used to navigating them.<BR><BR><BR> <BR><BR>See Also<BR>

  3. #3
    Tom R. Earlywine Guest

    Default thanks

    thanks for the lookup!<BR><BR>(that&#039;s the problem... learning to use them. I was searching for my answer rather than searching by statement.)

  4. #4
    Join Date
    Dec 1969

    Default RE: Looks to me...

    Access databases actually have two levels of password protection, a database password (that has no associated user) and the user/group password (default if not specified is always user Admin with no password)<BR><BR>To specify the "database password" you would adapt the above syntax to something like this (I am taking away the excel stuff):<BR><BR>SELECT * <BR>FROM OpenDataSource( &#039;Microsoft.Jet.OLEDB.4.0&#039;,<BR> &#039;Data Source="c:Financeaccount.mdb";Jet OLEDB:Database Password=blahblahblah;User ID=Admin;Password=;&#039;<BR> )...<BR><BR>regards,<BR><BR>Dave Kawliche<BR><BR>

Posting Permissions

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