I'm trying to search for/display a specific record in my Access Database, but I'm getting the following error upon posting the search.
Error Type:
Provider (0x80004005)
Unspecified error
/sterilization/update_view_sln.asp, line 10
Occasionally I'll also get an "EOF/BOF or file has been deleted" message as well.
The obvious answer is that my record doesn't exist, but I've copied the querystrings from the URL and the record I'm looking for DOES exist in the database.
URL:
//localhost/sterilization/update_view_sln.asp?ID=5AAH31&PN=05AC87
Code:
<%
Dim adoCon
Dim rsSterile2
Dim strSQL
Dim RecNum
Dim PNum
RecNum = Request.QueryString("ID")
PNum = Request.QueryString("PN")
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sterilization.mdb")
Set rsSterile2 = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM SterilizationLog WHERE Packaging_Lot_Number = '" & PNum & "' & Sterile_Lot_Number = '" & RecNum & "'"
rsSterile2.Open strSQL, adoCon
%>
<table>
<tr>
<td valign=middle>Packaging Lot Number</td>
<td width=7></td>
<td height=40><% Response.Write(rsSterile2("Packaging_Lot_Number"))%></td>
<td width=14></td>
<td valign=middle>Sterile Lot Number</td>
<td height=40><% Response.Write(rsSterile2("Sterile_Lot_Number"))%></td>
</tr>
</table>
<form name="form" method="post" action="postupdatesterile.asp">
<table border=0>
<tr>
<td valign=middle>Quantity</td>
<td width=7></td>
<td height=40><input type="number" name="quantity" maxlength="10" value="<% = rsSterile2("Quantity") %>"></td>
</tr>
<tr>
<td valign=middle>Part Number</td>
<td width=7></td>
<td height=40><input type="text" name="partnumber" maxlength="20" value="<% = rsSterile2("Part_Number") %>"></td>
</tr>
<tr>
<td valign=middle>Reorder Number</td>
<td width=7></td>
<td height=40><input type="text" name="reordernumber" maxlength="20" value="<% = rsSterile2("Reorder_Number") %>"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
</form>
</td>
</tr>
</table>
</body>
</html>
<%
rsSterile2.Close
Set rsSterile2 = Nothing
Set adoCon = Nothing
%>
Error Type:
Provider (0x80004005)
Unspecified error
/sterilization/update_view_sln.asp, line 10
Occasionally I'll also get an "EOF/BOF or file has been deleted" message as well.
The obvious answer is that my record doesn't exist, but I've copied the querystrings from the URL and the record I'm looking for DOES exist in the database.
URL:
//localhost/sterilization/update_view_sln.asp?ID=5AAH31&PN=05AC87
Code:
<%
Dim adoCon
Dim rsSterile2
Dim strSQL
Dim RecNum
Dim PNum
RecNum = Request.QueryString("ID")
PNum = Request.QueryString("PN")
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sterilization.mdb")
Set rsSterile2 = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM SterilizationLog WHERE Packaging_Lot_Number = '" & PNum & "' & Sterile_Lot_Number = '" & RecNum & "'"
rsSterile2.Open strSQL, adoCon
%>
<table>
<tr>
<td valign=middle>Packaging Lot Number</td>
<td width=7></td>
<td height=40><% Response.Write(rsSterile2("Packaging_Lot_Number"))%></td>
<td width=14></td>
<td valign=middle>Sterile Lot Number</td>
<td height=40><% Response.Write(rsSterile2("Sterile_Lot_Number"))%></td>
</tr>
</table>
<form name="form" method="post" action="postupdatesterile.asp">
<table border=0>
<tr>
<td valign=middle>Quantity</td>
<td width=7></td>
<td height=40><input type="number" name="quantity" maxlength="10" value="<% = rsSterile2("Quantity") %>"></td>
</tr>
<tr>
<td valign=middle>Part Number</td>
<td width=7></td>
<td height=40><input type="text" name="partnumber" maxlength="20" value="<% = rsSterile2("Part_Number") %>"></td>
</tr>
<tr>
<td valign=middle>Reorder Number</td>
<td width=7></td>
<td height=40><input type="text" name="reordernumber" maxlength="20" value="<% = rsSterile2("Reorder_Number") %>"></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
</form>
</td>
</tr>
</table>
</body>
</html>
<%
rsSterile2.Close
Set rsSterile2 = Nothing
Set adoCon = Nothing
%>