Re: MS Access Connection with database password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think the code you translated might be for the .accdb file. In your translated code I noticed .mdb so per that page, this apples for .mdb

With database password (mdb file)
This is the connection string to use when you have an Access 97 - 2003 database protected with a password using the "Set Database Password" function in Access.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.mdb;
Jet OLEDB:Database Password=MyDbPassword;
Some reports of problems with password longer than 14 characters. Also that some characters might cause trouble. If you are having problems, try change password to a short one with normal characters.	


Sent from losPhone

> On Jun 6, 2014, at 1:27 PM, "Kjell Hansen" <kjell@xxxxxxxxx> wrote:
> 
> Hi again,
> It's an Access 2000 database and I've changed the password to a single a, still no show :(
> 
> The database is downloaded on a regular basis and I need to extract some data from it, so I have no control over version or password.
> 
> Thanks a lot
> /Kjell
> 
> "Richard Quadling"  skrev i meddelandet news:CAKUjMCWXJfFvC_0vKq7Y4_QX-4mLumE=TOU4_v+s=YjSPZQ1VA@xxxxxxxxxxxxxx...
> 
> Did you read the notes regarding password length, password content and
> Access version issues?
> 
> Do any of these apply to you?
> 
> I suspect one of them does.
> 
> 
>> On 4 June 2014 21:48, Kjell Hansen <kjell@xxxxxxxxx> wrote:
>> 
>> Hi,
>> I'm trying to connect to a MS Access database that has a database password
>> set.
>> According to http://www.connectionstrings.com/access/ you use the
>> folowing as a connection string in such cases:
>> Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;
>> Jet OLEDB:Database Password=MyDbPassword;
>> 
>> Which I translate into
>> $dbcon = new PDO( 'odbc:Driver={Microsoft Access Driver
>> (*.mdb)};DBQ=C:\\exampledb.mdb;Jet OLEDB:Database Password=MyDbPassword;'
>> );
>> But it doesn't work :(
>> When I have removed the password, there's no problem connecting but not
>> with password set.
>> 
>> I don't make the database, it's maintained elsewhere and I plan to
>> download it regularly and extract data from it so I need to connect to the
>> database with the password set.
>> 
>> Any help or hints are deeply appreciated!
>> /Kjell
>> 
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> Richard Quadling
> Twitter : @RQuadling
> EE : http://e-e.com/M_248814.html
> Zend : http://bit.ly/9O8vFY 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux