I have 2 problems...
1. I have a page with a recordset from an MS access database displaying fields in a table in an iframe
in the table is a delete link. When the delete link is clicked another page opens in the same frame with the record id passed. Everything works fine and the db record is deleted. I then reopen the original page and the deleted record is still showing in the page. It appears the recordset or table contents is not refreshing.
here is the code:
<html>
<head>
<%
set asplObj=Server.CreateObjec
t("ASPL.Lo
gin5")
'You can protect this page to a number of different users
'asplObj.User("user1")
'asplObj.User("user2")
'asplObj.User("user3")
'Or, you can protect this page to a number of different groups
'asplObj.Group("group1")
'asplObj.Group("group2")
'asplObj.Group("group3")
asplObj.Protect
Dim selectedid
selectedid = Request.Querystring("idpas
s")
%>
<BODY>
<%
Dim connStr
connStr = "Provider=Microsoft.Jet.OL
EDB.4.0; Data Source=" & Server.MapPath("Data\Compl
iance\File
DB.mdb")
Set rs = Server.CreateObject("ADODB
.Recordset
")
ShowSQL = "SELECT * FROM qryFiles WHERE [ID] =" & selectedid
' opening connection
rs.Open ShowSQL, connStr, 3, 4
%>
<BR>
<%response.write "Standard: " & rs("Standard")%>
<%response.write "-" & rs("SubStd")%>
<BR>
<%response.write "File: " & rs("File Name")%>
<BR>
<BR>
<BR>
<%
rs.Close
Set rs = Nothing
connStr = "Provider=Microsoft.Jet.OL
EDB.4.0; Data Source=" & Server.MapPath("Data\Compl
iance\File
DB.mdb")
Set rs = Server.CreateObject("ADODB
.Recordset
")
ShowSQL = "SELECT * FROM qryFiles WHERE [ID] =" & selectedid
' opening connection
rs.Open ShowSQL, connStr, 1, 3
rs.delete
rs.update
rs.Close
Set rs = Nothing
response.write "File Deleted..."
%>
<BR>
<a href="show.asp?stdpass=1.1
.1">Back</
a>
</BODY>
2. When the browser is completely shutdown, the ldb file does not go away. I cant seem to close the connection using connStr.close because the browser then yells at me like this:
Microsoft VBScript runtime error '800a01a8'
Object required: 'Provider=Microsoft.J'
/testpd/Y2008/CFileDel.asp
, line 59
if i take it out it works fine. but the connection doesnt get closed nicely like it should.
Start Free Trial