CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft Access Database Engine (0x80004005) Could not find file
- Article ID:
44 - Date Created
Tuesday, November 16, 2010 - Last Updated
Wednesday, November 17, 2010 - This Article Has been Viewed
2655 times - Short Desc
When working with Database's with your project, you need to make sure that the connection string does indeed lead to the directory that the database is in, if not, you will get this error. - Details
When creating your connection string, make sure that the database does infact exist in the location where you have create the string for.
If the database is located in a different folder (or) is named differently that what you have supplied in the connection string, you will get this error:
Microsoft Access Database Engine (0x80004005)
Could not find file 'G:\InetPub\wwwroot\Foldername\pagin.accdb'.
/paging.asp, line 5 - Recreate Issue
To recreate this issue,
<%
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=G:\InetPub\wwwroot\folderlocation\pagin.accdb;Persist Security Info=False;"
objConn.Open
%>
The database name in this case if missing the g to make it paging.accdb - Resolve Issue
To correct this issue.
Using the following string for your Access Database
Using the 2000-2003 Access Database
<%
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("paging.mdb") & ";"
objConn.Open
%>
(or)Direct path to the database<%
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Provider="Microsoft.Jet.OLEDB.4.0 "
objConn.Open "G:\InetPub\wwwroot\folderlocation\paging.mdb"
%>
If you are using the new ACCDB database by Microsoft 2007 and above, then you can use the following
<%
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
Server.MapPath ("paging.accdb") & ";"
objConn.Open
%>
(or) Using a direct path to your database.<%
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=G:\InetPub\wwwroot\folderlocation\paging.accdb;Persist Security Info=False;"
objConn.Open
%>
Making sure that you have spelled the name of the database correctly, as you can see in the Recreate Example above.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825