PDA

View Full Version : HELP PLEASE ... DATABASE error


prince_bakora
09-13-2008, 04:02 PM
hi all

I have a problem ... and hope to find the solution

firstly ... I design asp vbscript pages by dreamweaver mx 2004
when I insert in my pages static elements like text and images then preview it ... it works and all right

but if I insert database elements in my page ... then preview it .. browser show me this message



The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed. Please try the following:

Click the Refresh (http://javascript%3Cb%3E%3C/b%3E:location.reload%28%29) button, or try again later.
Open the localhost (http://localhost/) home page, and then look for links to the information you want.HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.
/twakol/ed.asp, line 8
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Page:
GET /twakol/ed.asp
Time:
‏13 ‏سبتمبر, ‏2008, 05:55:42 م
More information:
Microsoft Support (http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&ID=500;100&cat=Microsoft+OLE+DB+Provider+for+ODBC+Drivers&os=&over=&hrd=&Opt1=&Opt2=%2D2147467259&Opt3=%5BMicrosoft%5D%5BODBC+Microsoft+Access+Drive r%5D+Could+not+use+%27%28unknown%29%27%3B+file+alr eady+in+use%2E)


or you can see the picture

http://img360.imageshack.us/img360/8507/55015657ru4.jpg

I tried many databases ... all times have same results

to know :
my OS is XP sp2
I installed
IIS
MDAC
DREAMWEAVER MX 2004

rico1931
09-13-2008, 06:25 PM
So what is it that you want exactly? Do you want to know how to set up a DSN? What kind of database do you have? Access, Mysql..??? I bet there are a bunch different ones. You need to give us more information on what you want to do. Oh and welcome to the forum

prince_bakora
09-13-2008, 09:03 PM
I already know how to set up a DSN ... I make a DSN connection to MS ACCESS database ... and when I use this connection in dreamweaver mx 2004 to insert fields in my page ... this problem starting as the image

can anybody explain me where's the problem ?

rico1931
09-13-2008, 10:21 PM
code for the connection you are making please

prince_bakora
09-14-2008, 12:14 AM
Hi ... first, I want to say thanks

second, I do not use any code .. just design by dreamweaver

but I will show the code of a page and the error message that display when I want to preview it in my browser



the code of the page


<<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/pein.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_pein_STRING
Recordset1.Source = "SELECT * FROM Employees"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>ألسلام عليكم </p>
<p><%=(Recordset1.Fields.Item("EmployeeID").Value)%></p>
<p><%=(Recordset1.Fields.Item("FirstName").Value)%></p>
<p> <%=(Recordset1.Fields.Item("LastName").Value)%></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>



the error message :


The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot be displayed.Please try the following:

<LI id=instructionsText1>Click the Refresh (http://javascript<b></b>:location.reload()) button, or try again later.
Open the localhost (http://localhost/) home page, and then look for links to the information you want.HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.
/myfirstsite/untitled1.asp, line 8
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
GET /myfirstsite/untitled1.asp
Time:
‏14 ‏سبتمبر, ‏2008, 02:11:58 ص
More information:
Microsoft Support (http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&ID=500;100&cat=Microsoft+OLE+DB+Provider+for+ODBC+Drivers&os=&over=&hrd=&Opt1=&Opt2=%2D2147467259&Opt3=%5BMicrosoft%5D%5BODBC+Microsoft+Access+Drive r%5D+Could+not+use+%27%28unknown%29%27%3B+file+alr eady+in+use%2E)



this image can help you to view the code

http://img98.imageshack.us/img98/4369/69901493bh8.jpg

rico1931
09-18-2008, 06:44 PM
there is something wrong with the connection. Are you able to view your data when you use dreamweaver to set up the connection? Like when you test it out does the table in the pop up box display your information in the sql table? The connection looks right and other then you missing a few links like

[code]
Dim rsDevice_cmd[code]

daysray
12-14-2009, 08:11 PM
Hi Prince,
I'm having the same issues. The database info shows up sometimes, but usually not. Did you find out what this problem was?

Thanks.

mangofreak
01-06-2010, 12:40 AM
Is your IIS setup to serve ASP files?
Does your database have the proper permissions?

daysray
01-15-2010, 05:37 PM
Yes. Actually, I finally got evey piece of security turned off and it now works on my pc, but when I upload it to the web it doesn't work. I think I've got everything pathed right so now am at a loss...

suzybee
06-02-2010, 10:54 PM
I was having the same problem with the sever 500 errors so what I did was call my hosting service and made sure I was on the correct server type to read MS Access databases. Then I set up the DSN on the server, had to set up the database connection (using the database window with server behaviors). I had to use the custom connection string (this can be found on your hosting site (absolute path)). Once I had a connection to the database I added another server behavior to login users based on name and password. Everything works now. If your personal computer isn't your hosting/server computer you will not be able to use the DSN (standard) you'll need to get the custom string).
I hope this helped. I've only got as far as loging in users I am still trying to figure out how they can update they display on the page.

andrewetheridge
06-14-2017, 11:57 AM
Try to check your database file name.