For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > November 2004 > Re: [PHP-WIN]Permission deny on connecting MS Access database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN]Permission deny on connecting MS Access database
Luis Moreira

2004-11-26, 9:01 am

This is not a PHP error, it's a DB error, and the message is very clear.
Either the database is opened allready, and exclusively, or you have to
give a username/password with sufficient rights, which you are not
doing, with that command.

Luis


Emperor Kang Xi wrote:

> Hi all,
>
> I need help to solve my problem, I use ADO to connect MS Access
> database; the data is store in another server computer; I have try two
> different way to access the data, and below is the code:
> -----------------------------------------
> //$dbName = "\\SERVER\mdb\mydata.mdb";
> $dbName = "X:/mdb/mydata.mdb";
>
> $conn = new COM('ADODB.Connection');
> $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=$dbName;Persist Security Info=False");
>
> output:
> ------------------------------------------
> *Warning*: (null)(): Invoke() failed: Exception occurred. *Source*:
> Microsoft JET Database Engine *Description*: The Microsoft Jet
> database engine cannot open the file 'X:\mdb\mydata.mdb'. It is
> already opened exclusively by another user, or you need permission to
> view its data.
>
>
> Thanks
> ------------------------------------------------------------------------
> 康熙
> ------------------------------------------------------------------------
> Walla! Mail - get your free 1G mail today <http://www.walla.com>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com