Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unsrecified Error 1

Status
Not open for further replies.

dashusa

Programmer
Mar 27, 2006
46
US
Hello i am making a page that displays data from a database .
I am using ASP and JScript
i am getting a wierd error because sometimes i can display the data and when i hit 'refresh' it brings up the error page and says that it is an unspecified error....
Please help me resolve this issue
Thank you
D
 
<%@ LANGUAGE="JScript"%>
<!-- #include file="adojavas.inc" -->
<HTML>
<HEAD>
<TITLE>Admin View</TITLE>

</HEAD>
<%
var conn = Server.CreateObject("ADODB.Connection");
var recordSet = Server.CreateObject("ADODB.RecordSet");
conn.Open("DSN=excuse");
recordSet.Open("select * from Details",conn,adOpenKeyset,adLockOptimistic);
%>
<BODY>
<%
while(!recordSet.EOF)
{
%><table>
<tr>
<td><font size="-1"><%=recordSet("FirstName")%></font></td>
<td><font size="-1"><%=recordSet("LastName")%></font></td>
<td><font size="-1"><%=recordSet("PhoneNumber")%></font></td>
<td><font size="-1"><%=recordSet("Email")%></font></td>
<td><font size="-1"><%=recordSet("Country")%></font></td>
<td><font size="-1"><%=recordSet("City")%></font></td>
<td><font size="-1"><%=recordSet("State")%></font></td>
<td><font size="-1"><%=recordSet("Zip")%></font></td>
</font></tr>
<%
recordSet.MoveNext();
}%>
</script>
</table>
</BODY>
</HTML>
 
Close the recordset and the connection after the loop.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Brilliant!!
Stupid errors always get me
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top