Advertisement

05.23.2008 at 01:08AM PDT, ID: 23426897
[x]
Attachment Details

Recordset refresh problem

Asked by georgehayes3 in Active Server Pages (ASP), VB Objects, VB Script

Tags: asp, IE6+

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.CreateObject("ASPL.Login5")

'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("idpass")

%>
<BODY>

<%
    Dim connStr
    connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("Data\Compliance\FileDB.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.OLEDB.4.0; Data Source=" & Server.MapPath("Data\Compliance\FileDB.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
[+][-]05.23.2008 at 03:09AM PDT, ID: 21630740

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 05:43AM PDT, ID: 21631502

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 05:44AM PDT, ID: 21631509

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 05:59AM PDT, ID: 21631643

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 06:01AM PDT, ID: 21631657

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 11:20AM PDT, ID: 21634441

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 11:34AM PDT, ID: 21634566

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 11:51AM PDT, ID: 21634745

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 01:34PM PDT, ID: 21635612

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), VB Objects, VB Script
Tags: asp, IE6+
Sign Up Now!
Solution Provided By: purplepomegranite
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628