CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Need help with database error

Print topic Send  topic

Author Message
Barry G. Sumpter
Posted: 04/19/2002, 5:41 PM

Error Type:
Microsoft JET Database Engine (0x80004005)
Could not use ''; file already in use.
/Simplecalendar/Common.asp, line 25


Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
'-------------------------------
' Create database connection string, login and password variables
'-------------------------------
Dim strConn, strLogin, strPassword
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\CodeCharge\ShoppingList\SimpleCalendar\Calendar.md
b;Persist Security Info=False"
strLogin = "Admin"
strPassword = ""
'-------------------------------
' Open the connection
'-------------------------------
cn.open strConn, strLogin, strPassword 'line 25

Thanks,
Barry G. Sumpter

Geert Larsen
Posted: 04/20/2002, 1:47 AM

http://www.gotocode.com/art.asp?art_id=22&#_Toc517639971

/geert

"Barry G. Sumpter" <bsumpter@bigpond.net.au> wrote in message
news:a9qdft$pn8$1@news.codecharge.com...
> Error Type:
> Microsoft JET Database Engine (0x80004005)
> Could not use ''; file already in use.
> /Simplecalendar/Common.asp, line 25
>
>
> Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
> '-------------------------------
> ' Create database connection string, login and password variables
> '-------------------------------
> Dim strConn, strLogin, strPassword
> strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>
Source=C:\Inetpub\wwwroot\CodeCharge\ShoppingList\SimpleCalendar\Calendar.md
> b;Persist Security Info=False"
> strLogin = "Admin"
> strPassword = ""
> '-------------------------------
> ' Open the connection
> '-------------------------------
> cn.open strConn, strLogin, strPassword 'line 25
>
> Thanks,
> Barry G. Sumpter
>
>

Barry G. Sumpter
Posted: 04/20/2002, 2:32 AM

ta

"Geert Larsen" <gl@fritzhansen.com> wrote in message
news:a9r9v2$8n4$1@news.codecharge.com...
> http://www.gotocode.com/art.asp?art_id=22&#_Toc517639971
>
> /geert
>
> "Barry G. Sumpter" <bsumpter@bigpond.net.au> wrote in message
>news:a9qdft$pn8$1@news.codecharge.com...
> > Error Type:
> > Microsoft JET Database Engine (0x80004005)
> > Could not use ''; file already in use.
> > /Simplecalendar/Common.asp, line 25
> >
> >
> > Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
> > '-------------------------------
> > ' Create database connection string, login and password variables
> > '-------------------------------
> > Dim strConn, strLogin, strPassword
> > strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> >
>
Source=C:\Inetpub\wwwroot\CodeCharge\ShoppingList\SimpleCalendar\Calendar.md
> > b;Persist Security Info=False"
> > strLogin = "Admin"
> > strPassword = ""
> > '-------------------------------
> > ' Open the connection
> > '-------------------------------
> > cn.open strConn, strLogin, strPassword 'line 25
> >
> > Thanks,
> > Barry G. Sumpter
> >
> >
>
>

Barry G. Sumpter
Posted: 04/20/2002, 3:05 PM

MORE INFORMATION ( a quick test)
A quick way of ensuring any particular error is a permissions issue is to
add the IUSR_<machinename> account to the Administrators group. If this
fixes the error, then it is a matter of ensuring that the user account being
used has sufficient permissions. Ensure that you remove the
IUSR_<machinename> account from the Administrators group when finished
testing.

RESOLUTION
If the page is meant to be accessed anonymously, give the IUSR_<machinename>
account full control to the ASP page, and the folder and files where the
database is located. Additionally, if the path to the database is being
referenced using UNC (\\Server\Share), ensure that the Share Permissions
allow the IUSR_<machinename> account full access. This step applies even if
the share is on the local Web server.

If the page has been secured such that the IUSR_<machinename> can't access
the file or database, then ensure that the user's account that is being
authenticated has full control to the appropriate folders and files.

At a minimum, the account being used needs Create, Destroy, Read, Write to
work with the .ldb file. Specific permission can be applied to the database
to limit access.



STATUS
This behavior is by design.


baz


"Barry G. Sumpter" <bsumpter@bigpond.net.au> wrote in message
news:a9qdft$pn8$1@news.codecharge.com...
> Error Type:
> Microsoft JET Database Engine (0x80004005)
> Could not use ''; file already in use.
> /Simplecalendar/Common.asp, line 25
>
>
> Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
> '-------------------------------
> ' Create database connection string, login and password variables
> '-------------------------------
> Dim strConn, strLogin, strPassword
> strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>
Source=C:\Inetpub\wwwroot\CodeCharge\ShoppingList\SimpleCalendar\Calendar.md
> b;Persist Security Info=False"
> strLogin = "Admin"
> strPassword = ""
> '-------------------------------
> ' Open the connection
> '-------------------------------
> cn.open strConn, strLogin, strPassword 'line 25
>
> Thanks,
> Barry G. Sumpter
>
>

Barry G. Sumpter
Posted: 04/20/2002, 4:00 PM

Ok. Problem Solved.

Precisely how I fixed the problem:

My user logon account was already a member of the Administrator group.
So I DID NOT have to add my user logon to the folder security for
the virtual web directory or the .mdb directory for my logon.
Since this was already taken care of with the Administrators group.

However, the internet guest account (IUSR_<machinename>)
DID have to be added to ONLY the .mdb directory.

And the NOT virtual web directory (under wwwroot).

end of solution


I'm deducing the internet guest account has default access to the veirutal
web directory anyway.
Please feel free to correct me here.

Furthermore, my web page only required access to the .mdb file.
If I updated only the .mdb file with full security access the page still
failed.
If I update the .mdb and the .ldb the page loaded successfully.

I couldn't understand this at first since the .ldb wasn't present the first
time I looked at the .mdb directory.
Access creates the .ldb on first execution of the .mdb and since it's just
an Access play area we usually
DO NOT include the .ldb with the setups.
I'm sure you've already figured this out, but I decided to give full
security access to the .mdb folder and NOT
just the individual files.
Continuing with this line of thought, one could have a database folder with
sub-folders for seperating the databases for individual applications. And
give full permissions to the root database folder.
Again, being a novice I hope to be corrected on this issue.


At the moment I'm not too worried about the details of the security access
described here
since I'm only an In-TRA-net W2K Server.

But if anyone would like to attempt a short and consise explanation, then
please feel free.


Thanks,
Barry G. Sumpter



"Barry G. Sumpter" <bsumpter@bigpond.net.au> wrote in message
news:a9soms$p9t$1@news.codecharge.com...
> MORE INFORMATION ( a quick test)
> A quick way of ensuring any particular error is a permissions issue is to
> add the IUSR_<machinename> account to the Administrators group. If this
> fixes the error, then it is a matter of ensuring that the user account
being
> used has sufficient permissions. Ensure that you remove the
> IUSR_<machinename> account from the Administrators group when finished
> testing.
>
> RESOLUTION
> If the page is meant to be accessed anonymously, give the
IUSR_<machinename>
> account full control to the ASP page, and the folder and files where the
> database is located. Additionally, if the path to the database is being
> referenced using UNC (\\Server\Share), ensure that the Share Permissions
> allow the IUSR_<machinename> account full access. This step applies even
if
> the share is on the local Web server.
>
> If the page has been secured such that the IUSR_<machinename> can't access
> the file or database, then ensure that the user's account that is being
> authenticated has full control to the appropriate folders and files.
>
> At a minimum, the account being used needs Create, Destroy, Read, Write to
> work with the .ldb file. Specific permission can be applied to the
database
> to limit access.
>
>
>
> STATUS
> This behavior is by design.
>
>
> baz
>
>
> "Barry G. Sumpter" <bsumpter@bigpond.net.au> wrote in message
>news:a9qdft$pn8$1@news.codecharge.com...
> > Error Type:
> > Microsoft JET Database Engine (0x80004005)
> > Could not use ''; file already in use.
> > /Simplecalendar/Common.asp, line 25
> >
> >
> > Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
> > '-------------------------------
> > ' Create database connection string, login and password variables
> > '-------------------------------
> > Dim strConn, strLogin, strPassword
> > strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> >
>
Source=C:\Inetpub\wwwroot\CodeCharge\ShoppingList\SimpleCalendar\Calendar.md
> > b;Persist Security Info=False"
> > strLogin = "Admin"
> > strPassword = ""
> > '-------------------------------
> > ' Open the connection
> > '-------------------------------
> > cn.open strConn, strLogin, strPassword 'line 25
> >
> > Thanks,
> > Barry G. Sumpter
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.