-
dbStartUp="EditUpdate" Problems
Dear Forum Folks,
Background:
Windows 2000 / Access database
Server Software: Microsoft-IIS/5.0
Server Protocol: HTTP/1.1
VBScript Engine: 5.1.5907
ASPdb Universal Version: ASPDB2001-06.20-SP3-ADO21-MTS-Std
I have two pages - the first one (dbUnit=1911) is a projects table with an edit button on each record that links via MagicCell to the second page (dbUnit=5001) which should open to EditUpdate for the record of interest.
I use the two page setup because there are several related tables to edit (on additional second pages).
From previous discussions on this issue (John's Feb 2002 post), my link is as follows:
<A HREF=""admin-projects-general.asp?ProjectID=#ProjectID#&ProjectName=#Pro jectName#&ASPdbUnit=5001"">
At the destination page the ID and Name are the Request variables currentProjectID and currentProject Name. I use the following to set page variables:
If Request("ProjectID" = "" Then
currentProjectID = session("savedProjectID"
Else
session("alreadystartup_5001"=false
session("Newsession_5001"=true
session("Alive_5001"=false
End If
session("savedProjectID" = currentProjectID
The ASPdb SQL looks like:
x.dbSQL = "SELECT * FROM Projects WHERE ProjectID=" & currentProjectID
At the top of the page I display Project Name (using regular ASP and the Request variables) and it is always correct. But, no matter what I do, I keep getting the record from the previous request displayed by the ASPdb section below. I have been working on this problem for days. I have displayed all the variables before and after each section and they appear correct.
Any ideas? Thanks, Ted
-
dbStartUp="EditUpdate" Problems (reply)
Thanks Mark, but that wasn't it. I should have included the line before the "IF" which was the one you suggested:
currentProjectID = Request("ProjectID"
I have inserted "Response Writes" throughout the page and it shows the currentProjectID is the one I selected immediately before going into the ASPdb section. It show the correct one after the ASPdb section also.
Is it possible the ASPdb code is running before the other code? I also get an error the very first time I request the record:
Error # (Get_RS_GetCount - After open CountSQL) = 80040E0C(-2147217908)
Description = Command text was not set for the command object.
Still searching.
------------
Mark at 4/25/2002 10:08:09 AM
Hi Ted,
The first time in your currentProjectID never gets defined.
If Request("ProjectID" = "" Then
currentProjectID = session("savedProjectID"
Else
currentProjectID = Request("ProjectID" ' **** ADD THIS LINE
session("alreadystartup_5001"=false
session("Newsession_5001"=true
session("Alive_5001"=false
End If
Session("savedProjectID" = currentProjectID
That should help.
Mark
------------
Ted Moore at 4/24/2002 5:26:17 PM
Dear Forum Folks,
Background:
Windows 2000 / Access database
Server Software: Microsoft-IIS/5.0
Server Protocol: HTTP/1.1
VBScript Engine: 5.1.5907
ASPdb Universal Version: ASPDB2001-06.20-SP3-ADO21-MTS-Std
I have two pages - the first one (dbUnit=1911) is a projects table with an edit button on each record that links via MagicCell to the second page (dbUnit=5001) which should open to EditUpdate for the record of interest.
I use the two page setup because there are several related tables to edit (on additional second pages).
From previous discussions on this issue (John's Feb 2002 post), my link is as follows:
<A HREF=""admin-projects-general.asp?ProjectID=#ProjectID#&ProjectName=#Pro jectName#&ASPdbUnit=5001"">
At the destination page the ID and Name are the Request variables currentProjectID and currentProject Name. I use the following to set page variables:
If Request("ProjectID" = "" Then
currentProjectID = session("savedProjectID"
Else
session("alreadystartup_5001"=false
session("Newsession_5001"=true
session("Alive_5001"=false
End If
session("savedProjectID" = currentProjectID
The ASPdb SQL looks like:
x.dbSQL = "SELECT * FROM Projects WHERE ProjectID=" & currentProjectID
At the top of the page I display Project Name (using regular ASP and the Request variables) and it is always correct. But, no matter what I do, I keep getting the record from the previous request displayed by the ASPdb section below. I have been working on this problem for days. I have displayed all the variables before and after each section and they appear correct.
Any ideas? Thanks, Ted
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|