IIS & MS Access

Haven

Supreme [H]ardness
Joined
Oct 11, 2002
Messages
6,469
We have a intranet site that uses a Access Database. This site used to be on a IIS 4.0 running under Windows NT 4. That server died, now I moved the website to a Windows 2000 Server running IIS 5. I setup the database as a ODBC object.

I can access the data via an ASP page with out a problem. But if I go back a page, and try to access data from the Database again, I get an ASP error:

Error Type:
Provider (0x80004005)
Unspecified error
/Internal Resources/Employee/homenumbers.asp, line 3


Line 3 just reads:

conn.open "contact"

contact is the name of the ODBC connection. Permissions on the file are read/write for the IUSR account.

So far it seems to be a locking issue. Any ideas on how to keep the DB from being locked? Any ideas what I am doing wrong? I have updated MDAC on the box. I can't figure out why we are having a locking issue on 2000, but didn't have it on NT 4.

Thoughts, ideas, etc?
 
Is it possible a prior page hit caused the connection to be opened and then for some reason the page failed to close it? That seems the likely cause. I've never really used access, so I don't know ot any special bahaviors, but you might wand to check to make sure.
 
ianshot,

first of all, i'm assuming it's "classic" asp that you are using.

my first guess from the error message and when you can cause the error is it's a database locking issue and/or object reference issue.

can you give a version number as well (2.0 or 3.0) ?? is the win2k box running sp4? what version of win2k is it? what version of MDAC did you install?


things to do:

1 - see if you are closing connections and setting the connection and any ADODB objects to "nothing" at the end of your asp code. with the way that the memory "garbage collector" in win2k works, you can get odd errors from not cleaning up your variables (which is just good coding preventative maintenance).

2 - post a copy of the first 3-5 lines from the original *calling* asp object, as well as your connection strings used (please blank-out passwords and other security-related text, but if you do use this in your connection string, then at least leave it indicated in the connection string that some value *should* be there when you run it locally)


i'll take look further into this after your reply.
 
PTNL said:
ianshot,

first of all, i'm assuming it's "classic" asp that you are using.

my first guess from the error message and when you can cause the error is it's a database locking issue and/or object reference issue.

can you give a version number as well (2.0 or 3.0) ?? is the win2k box running sp4? what version of win2k is it? what version of MDAC did you install?


things to do:

1 - see if you are closing connections and setting the connection and any ADODB objects to "nothing" at the end of your asp code. with the way that the memory "garbage collector" in win2k works, you can get odd errors from not cleaning up your variables (which is just good coding preventative maintenance).

2 - post a copy of the first 3-5 lines from the original *calling* asp object, as well as your connection strings used (please blank-out passwords and other security-related text, but if you do use this in your connection string, then at least leave it indicated in the connection string that some value *should* be there when you run it locally)


i'll take look further into this after your reply.

Version number of what? Sorry, I'm not a programer, I am a network administrator. My programming knowledge is somewhat limited.

The machine is running W2k Server SP4, I installed MDAC 2.8 (most recent version I could find on MS's site).

The code is as follows:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "abg_contact"
sql = "Select employee_id, Start_Date, empl_first_name, empl_middle_initial, empl_last_name, home_address1, home_address2, city, Birthday, "
sql = sql & "state, postal_code, home_phone, fax, mobile, spouse_name"
sql = sql & " FROM EMPLOYEE WHERE inactive = false order by empl_last_name,empl_first_name, empl_middle_initial"
Set rs = conn.Execute(sql)
%>

And how would I do #1, closing the connection? Again, I can do some basic HTML, and a bit of php, but I'm not real good at this.

Thanks for the help, I really do apprecate it!
 
ianshot said:
Version number of what? Sorry, I'm not a programer, I am a network administrator. My programming knowledge is somewhat limited.

The machine is running W2k Server SP4, I installed MDAC 2.8 (most recent version I could find on MS's site).

The code is as follows:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "abg_contact"
sql = "Select employee_id, Start_Date, empl_first_name, empl_middle_initial, empl_last_name, home_address1, home_address2, city, Birthday, "
sql = sql & "state, postal_code, home_phone, fax, mobile, spouse_name"
sql = sql & " FROM EMPLOYEE WHERE inactive = false order by empl_last_name,empl_first_name, empl_middle_initial"
Set rs = conn.Execute(sql)
%>

And how would I do #1, closing the connection? Again, I can do some basic HTML, and a bit of php, but I'm not real good at this.

Thanks for the help, I really do apprecate it!


try this code
Code:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")

conn.open "abg_contact"

sql = "Select employee_id, Start_Date, empl_first_name, empl_middle_initial, empl_last_name, home_address1, home_address2, city, Birthday, "
sql = sql & "state, postal_code, home_phone, fax, mobile, spouse_name"
sql = sql & " FROM EMPLOYEE WHERE inactive = false order by empl_last_name,empl_first_name, empl_middle_initial"

rs.Open sql, conn

while (not rs.EOF)
 'do stuff
rs.MoveNext
Wend

rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
 
Well that didn't work, but I got new and different errors this time. I now get an error on line 63, which is:

Code:
if not rs.eof then

Hopefully with the whole page, you very helpful people will get an idea of what we are trying to do. Here is the whole webpage with the changes maw suggested:

Code:
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")

conn.open "abg_contact"
sql = "Select employee_id, Start_Date, empl_first_name, empl_middle_initial, empl_last_name, home_address1, home_address2, city, Birthday, "
sql = sql & "state, postal_code, home_phone, fax, mobile, spouse_name"
sql = sql & " FROM EMPLOYEE WHERE inactive = false order by empl_last_name,empl_first_name, empl_middle_initial"
Set rs = conn.Execute(sql)
%>
<html>

<head>
<meta name="Microsoft Theme" content="none">
<title>ABG Employee Addresses and Home Phones</title>
</head>

<body bgcolor="#FFFFFF">
<b>

<p ALIGN="CENTER"><font face="Arial"><a name="top">EMPLOYEE LIST</a></font></p></b>
<font SIZE="3"><div align="center"><center>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#A-B">A-B</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#C-D">C-D</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#E-F">E-F</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#G-H">G-H</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#I-J">I-J</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#K-L">K-L</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#M-N">M-N</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#O-P">O-P</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#Q-S">Q-S</a></font></td>
    <td width="4%" align="center" height="23"><font face="Arial"><a href="#T-Z">T-Z</a></font></td>
  </tr>
</table>
</center></div>

<p align="center"><font face="Arial"><a href="#OTHER NUMBERS">Other numbers</a></font></p>

<p>&nbsp;</p>
<div align="left">

<table border="1" cellpadding="3" cellspacing="0" width="100%" height="1858">
  <tr>
    <td width="100%" colspan="2" height="37"><p align="center"></font><font size="5"
    face="Arial"><a name="A-B"><strong>A-B</strong></a></font></td>
  </tr>
<%
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
While not rs.eof and sFirstLetter < "C"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"></font><font face="Arial"
    SIZE="3"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
if not rs.eof and sFirstLetter < "C" then%>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"></font><font face="Arial"
    SIZE="3"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></td>
<%rs.movenext%>
<%else%>
    <td WIDTH="50%" HEIGHT="90"></td>
<%end if%>
  </tr>
<%  if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))

	end if
wend%>
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" height="37"><p align="center"><font SIZE="3">&nbsp;</p>
    <p align="center"></font><font size="5" face="Arial"><a name="C-D"><strong>C-D</strong></a></font></td>
  </tr>
<%
While not rs.eof and sFirstLetter < "E"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
if not rs.eof and sFirstLetter < "E" then%>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext%>
<%else%>
    <td WIDTH="50%" HEIGHT="90"></td>
<%end if%>
  </tr>
<%  if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
	end if
wend%>
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" height="37"><p align="center"><font SIZE="3">&nbsp;</p>
    <p align="center"></font><font face="Arial" SIZE="3"><a name="E-F"><strong>E-F</strong></a></font></td>
  </tr>
<%
While not rs.eof and sFirstLetter < "G"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
if not rs.eof and sFirstLetter < "G" then%>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext%>
<%else%>
    <td WIDTH="50%" HEIGHT="90"></td>
<%end if%>
  </tr>
<%  if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
	end if
wend%>
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" height="37"><p align="center">&nbsp;</p>
    <p align="center"><font size="5" face="Arial"><a name="G-H"><strong>G-H</strong></a></font></td>
  </tr>
<%
While not rs.eof and sFirstLetter < "I"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
if not rs.eof and sFirstLetter < "I" then%>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext%>
<%else%>
    <td WIDTH="50%" HEIGHT="90"></td>
<%end if%>
  </tr>
<%  if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
	end if
wend%>
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" height="24"><p align="center"><font SIZE="3">&nbsp;</p>
    <p align="center"></font><font face="Arial" SIZE="3"><a name="I-J"><strong>I-J</strong></a></font></td>
  </tr>
<%
While not rs.eof and sFirstLetter < "K"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
if not rs.eof and sFirstLetter < "K" then%>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext%>
<%else%>
    <td WIDTH="50%" HEIGHT="90"></td>
<%end if%>
  </tr>
<%  if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
	end if
wend%>
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
  <tr>
    <td width="100%" height="24" colspan="2" align="center"><font SIZE="3">&nbsp;<p></font><font
    face="Arial" SIZE="3"><a name="K-L"><strong>K-L</strong></a></font></td>
  </tr>
<%
While not rs.eof and sFirstLetter < "M"%>
  <tr>
    <td width="50%" height="90"><font SIZE="3"><p ALIGN="CENTER"><font face="Arial"><%=rs("empl_first_name") & " " & rs("empl_last_name")%><br>
<%=rs("home_address1")%>    <br>
<%if rs("home_address2") & "" <> "" then%><%=rs("home_address2") & ""%>    <br>
<%end if%><%=rs("City") & ", " & rs("State") & " " & rs("Postal_Code")%>    <br>
<%=rs("home_phone") & ""%>    <br>
<%if rs("fax") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">fax:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("fax") & ""%> <br>
<%end if%><%if rs("mobile") & "" <> "" then%>    </font><strong><font face="Times New Roman" SIZE="1">mobile:</font></strong><font
    face="Arial" SIZE="3"> <%=rs("mobile") & ""%><br>
<%end if%><%=rs("Birthday") & ""%>    <br>
<%if rs("spouse_name") & "" <> "" then%>    (<%=rs("spouse_name") & ""%>) <br>
<%end if%>    </font></font></td>
<%rs.movenext
if not rs.eof then
	sFirstLetter = ucase(left(rs("empl_last_name"),1))
end if
  <tr>
    <td width="100%" align="center" height="90" colspan="2"><font face="Arial"><a href="#top">Return
    to top</a></font></td>
  </tr>
 
</table>
</div>

<p ALIGN="CENTER">&nbsp;</p>

</body>
</html>
Again, thanks for all the help, I really am in way over my head here. (I keep thinking I need to learn ASP and PHP, just to troubleshoot this stuff. Instead of just being a Server/Network monkey).

Did you know there is a 20000 character limit with posts....ugh. :eek:
 
waht exactly is the new error message saying?

also, don't use

Set rs = Server.CreateObject("ADODB.Recordset")

and then later do

Set rs = conn.Execute(sql)

that could totally screw you up.

Instead use

rs.Open sql, conn
 
Error message is:

Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required
/Internal Resources/Employee/homenumbers.asp, line 63


However, looking at what I copied into my last message, I copied from the wrong file. I copied the backup file into the message instead of the updated file. The updated file has what you (maw) put in your message. Sorry about the confusion.
 
OK , Object required means you probably have a typo in there, or you are attempting to Open or Close an object that wasn't declared.

E.g. - you are attempting to do rs.Open but never created rs in the first place, or are attempting to do a While not rs.EOF before doing rs.Open first..
 
as for the version number question, i was referring to the version of ASP. if it's win2k server, then it's probably v3.0.

well that's a good amount of code to filter through.

i can *guess* which line is line 63 that the error says it is being triggered on, but i would like you to reply with what line in your code block is line 63 just to be 100% clear. i'd also like to see the actual connection strings used. things i would pay attention to include: the actual connection string "Provide=Microsoft ... (blah blah blah) .. Data Source=C:\...", database lock used, database read type used, etc.

in your code block, use parenthesises to separate comparisons. this line:
While not rs.eof and sFirstLetter < "C"
should be rather changed to:
While (not rs.eof) and (sFirstLetter < "C")

** NOTE: in that comparison, what are you (in plain english) trying to compare against? i think you've got a type/cast conversion issue with that comparison.

this isn't so much of an answer as it is a suggestion. create a new .asp file with just the uppermost <% %> block, and a few "response.write()" lines in the "html" code block. put a "response.write" to display all sorts of info like:
rs.EOF
rs.RecordCount
lines like that allow you to see what is happening in the background, and gets *really* useful when troubleshooting loops (especially the pesky "unhandled exceptions" that can occur when you tell a loop to go one-to-many times through an array, recordset, etc.). try using this method to get some data to display. then add additional parts one-at-a-time from the problem page. once you hit an error, you'll know exactly when/where it happened

also, i dont see a <!-- #include file="myIncludedAspConnectionFile.asp" --> referenced anywhere. how sure are you that the connection is getting opened from the values in the "abg_contact" file?

are you also using "Option Explicit" in the beginning of an ASP file? that, while a slight performance hog on a production server, is a great ASP command to enable when programming/debugging. Sometimes it helps you get to the deeper root of the problem by removing some of the vb script's ability to implicitly create variables.

btw, good info so far on this post, let us know how things progress!
 
PTNL said:
as for the version number question, i was referring to the version of ASP. if it's win2k server, then it's probably v3.0.

You are more likely right.

PTNL said:
well that's a good amount of code to filter through.

Which is why in my message I put that the code in question was:

Code:
if not rs.eof then

PTNL said:
in your code block, use parenthesises to separate comparisons. this line:
While not rs.eof and sFirstLetter < "C"
should be rather changed to:
While (not rs.eof) and (sFirstLetter < "C")

I tried that, and it wasn't real thrilled with with the parenthesis. I got the error message:

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/Internal Resources/Employee/homenumbers.asp, line 66, column 42

I later got another error, but I didn't copy that one down because I wasn't at my machine, and could not get my machine to replicate the error. So I am not certain what I did wrong...

PTNL said:
this isn't so much of an answer as it is a suggestion. create a new .asp file with just the uppermost <% %> block, and a few "response.write()" lines in the "html" code block. put a "response.write" to display all sorts of info like:
rs.EOF
rs.RecordCount
lines like that allow you to see what is happening in the background, and gets *really* useful when troubleshooting loops (especially the pesky "unhandled exceptions" that can occur when you tell a loop to go one-to-many times through an array, recordset, etc.). try using this method to get some data to display. then add additional parts one-at-a-time from the problem page. once you hit an error, you'll know exactly when/where it happened

I'm afraid that my level of skill is not high enough to understand exactly what needs to be done. I understand what you are wanting me to do, but I am unsure of how to write the code to do this. Again I am not even remotely competent in ASP.

PTNL said:
also, i dont see a <!-- #include file="myIncludedAspConnectionFile.asp" --> referenced anywhere. how sure are you that the connection is getting opened from the values in the "abg_contact" file?

Since this is a Microsoft Access database we are using a ODBC connection and the connection name is "abg_contact". So I think it is calling that via the conn.open call and the rs.Open sql call.

PTNL said:
are you also using "Option Explicit" in the beginning of an ASP file? that, while a slight
btw, good info so far on this post, let us know how things progress!

I do not think we are using that option. Should I be? If so, how.

Sorry it took so long to get back to this, things got busy here last week.
 
Is there any other information I can provide? Any other questions people have for me? I still need help.

If I could just figure out the locking of the database and why it locks, and how to stop it. I really can't figure out why it is locking on Windows2000 but didn't lock on NT 4.0.

Any and all help is apprecated! Thanks!
 
Back
Top