473,507 Members | 3,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP DB Connection Error 80004005

Fary4u
273 Contributor
Hi any body know's where is the problem in following code ?
it's so simple but can't figer it out ? giving this error ?

[PHP]
Microsoft JET Database Engine error '80004005'
Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
dbfile.asp, line 3
[/PHP]

[PHP]

dim db, strConn, Path
Path = Server.MapPath( db.mdb )
strConn = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Path
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn

[/PHP]
Jul 7 '08 #1
10 3244
DrBunchman
979 Recognized Expert Contributor
Do you need to put quote marks around the name of your database? e.g.
Expand|Select|Wrap|Line Numbers
  1.  Path = Server.MapPath("db.mdb")
Dr B
Jul 7 '08 #2
Fary4u
273 Contributor
Thx for the reply i've tried it but now giving new error on line 5
i think so it's same line error

i've just put some " " but still

well actually it's works on the local host & giving error on the NET Hosting server
Jul 7 '08 #3
DrBunchman
979 Recognized Expert Contributor
Is it a new error? If so what is it?
Jul 7 '08 #4
Fary4u
273 Contributor
same error nothing else

[PHP]
Microsoft JET Database Engine error '80004005'
Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
dbfile.asp, line 5
[/PHP]
Jul 7 '08 #5
DrBunchman
979 Recognized Expert Contributor
What version of Windows and what version of IIS are you running on the server?

There is a known problem using JET with Windows Server 2003 and IIS 6.0 which intermittently doesn't return used database connections to the pool, causing it to run out of resources. If this is the case with your set-up the helpful advice from MSDN is to change your database to SQL Server!

Dr B
Jul 8 '08 #6
Fary4u
273 Contributor
it's working fine on windows xp iis 5 & DB is Access 2002

when i upload onto the webserver don't know why giving the same error ?
Jul 9 '08 #7
DrBunchman
979 Recognized Expert Contributor
What about the IIS and Windows versions on the server? What are they?
Jul 9 '08 #8
Fary4u
273 Contributor
iis 5 & windows server 2003
Jul 9 '08 #9
DrBunchman
979 Recognized Expert Contributor
Have you got another server you could try it on? Have you done any googling on that error message?

Dr B
Jul 10 '08 #10
jeffstl
432 Recognized Expert Contributor
Have you tried opening the .mdb file itself ?

In other words download the copy being accessed by the code, and try to open it.

See if the database actually did get corrupted? Are you able to access the database at ALL anywhere in the application?
Jul 11 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

13
2709
by: JIM.H. | last post by:
Hello I do not know anything about asb but I just want to import this part of VBscript file to an asp code to help my frined. This part of code is working if I run it as a vbscript on the command...
13
1846
by: Guy Hocking | last post by:
Hi there, i am creating a database driven login page. I am using code that has been successful in the past, however when i upload it to our web server it displys the following message in the...
5
6655
by: Jesper Carstensen | last post by:
We are running an ASP application. That is fairly simple. It selects from one table (15.000 records), and updates into another table. But when we execute the ASP script, it reports the...
5
4954
by: Brian Piotrowski | last post by:
Hi All, I almost have the connection working for my connection to the AS/400 from an ASP page. However, I have an error appearing, and I'm not sure how to fix it. The code I have for...
2
2509
by: EDDIE | last post by:
Dear All, I have problem on data connection to a SQL Server by Asp Statement. It's Very strange that my asp statement can connect to one remote SQL server but can't connect to other remote SQL...
2
1342
by: middletree | last post by:
First, here's my code(replaced some info with "foo": Dim strDBConnection strDBConnection = _ "Provider=SQLOLEDB;" & _ "Persist Security Info=False;" & _ "Data Source=w2003\ticketlog;" & _...
1
2369
by: Shilpa Ginode | last post by:
Hi All, I have a problem regarding SQLXMLBulkLoad.3.0 and the DSN connection. I have created a object of SQLXMLBulkLoad.3.0 in my DTS package. The connection for this object is DSN connection....
5
2508
by: rm | last post by:
When using ADO in a module inside an Access 2003 database do I need to open a db connection even though I am working with a table inside the same database? I am writing a bit of code to...
2
2747
borisding
by: borisding | last post by:
Hi all, I have recently migrated ASP application from Windows server 2000 to 2003. But failed to connect to SQL Server 2000. (Both sql server and application are on the same server) I keep...
0
7308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.