HELP! Recordsets problem with IIS 6.0

S

sKodi

I have a problem. When I had IIS 5.1 my Dreamweaver MX created
ADODB.Recordset objects for my ASP pages. Everything worked great. But now
it causes HTTP500 - Internal Server Error. What's up?
 
K

Ken Schaefer

In Internet Explorer, goto tools -> internet options -> advanced, and
uncheck "Show Friendly HTTP Errors" nd reload the page. Post the complete
error message to the group.

Cheers
Ken

: I have a problem. When I had IIS 5.1 my Dreamweaver MX created
: ADODB.Recordset objects for my ASP pages. Everything worked great. But now
: it causes HTTP500 - Internal Server Error. What's up?
:
:
 
S

sKodi

Here is the error message:

--------------------------------------------------
Microsoft JET Database Engine error '80004005'
Could not find file 'C:\WINDOWS\system32\websitesskodidata.mdb'.

/TMP3tq47hehzc.asp, line 5
-----------------------------------------------------

Here is the source of sample file (TMP3tq47hehzc.asp), I've added some
comments to the lines:


----------------------------------------------------------------------------
--

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1251"%> //start of the file, defining
ASP language and codepage
<%
// FileName="Connection_ado_conn_string.htm"
//comment of DreamWeaver MX
// Type="ADO"
//comment of DreamWeaver MX
// DesigntimeType="ADO"
//comment of DreamWeaver MX
// HTTP="false"
//comment of DreamWeaver MX
// Catalog=""
//comment of DreamWeaver MX
// Schema=""
//comment of DreamWeaver MX
var MM_main_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:/websites/skodi/data.mdb" //connection string
%>
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset");
//creating of recordset
Recordset1.ActiveConnection = MM_main_STRING;
//connection
Recordset1.Source = "SELECT * FROM global_variables";
//query
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
//opening recordset
var Recordset1_numRows = 0;
%>
<html>
<head>
<title>Sample Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>

<body>
</body>
</html>
<%
Recordset1.Close();
%>
----------------------------------------------------------------------
 
A

Aaron Bertrand - MVP

Source=C:/websites/skodi/data.mdb"

These should be \ slashes, not / slashes.

Or, better yet, use server.mappath so that you are not affected by changes
to the local filesystem.
 
S

sKodi

No, there must be backslashes. It worked well on IIS 5.0 and IIS 5.1 .
However, I've solved this problem myself now. Thanks to Ken Shaefer for his
advice about IE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top