Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table update
Message
General information
Forum:
Internet
Category:
Active Server Page
Title:
Miscellaneous
Thread ID:
00947111
Message ID:
00949350
Views:
11
Mark;

Nothing really jumps up to bite me, but I will offer a few ideas.

1. Remove Session Variable and hard code a valid value.


2. Try closing the connection at the end of each page, if it is not already done.


3. You can always be “crude” and place a line of code at the beginning of your ASP code:

on error resume next


4. Code out Session.Timeout=5 ‘Code out Session.Timeout=5

5. I am not too sure of the line:

If not step3_RS.eof Then

6. Comment out (by using ‘) lines of code from the bottom up - like at the Update(), and the SQL Statement, etc. See what happens. Add one thing at a time from the top down. I hope that makes sense.

7. Use response.write “step3_RS ("per_stage")” & step3_RS ("per_stage") after the Select statement and before the Update() to see the values.

Debugging ASP can be a real pain! Apply Guinness Stout and Old Bushmills as required! :)

Let me know how it goes.

Tom




>Tom,
>i have hit this problem again, any chance you could throw an eye over it please. I have ruled out the session valiable being the problem but have included the code here as it is in my application. the first block works perfectly the second returns a "Invalid argument value" error.
>
><% @Language=VBScript
><% Option Explicit
><% ' Making sure that the Engineer user is logged in
>If SESSION("USER_ROLE") <> "SITE" AND SESSION("USER_ROLE") <> "DEPHEAD" Then
>	Response.redirect ("default.asp?timeout=3")
>End If
>
>Session.Timeout=5
>
><!--#include file="connection.asp"-->
><!--#include file="adovbs.inc"-->
><%
>Dim whattodo, step3_RS, step3_SQL
>
>whattodo = request("what")
>
>
>Set step3_RS=Server.CreateObject("ADODB.Recordset")
>step3_SQL = "SELECT per_stage, per_deph, per_ddate, per_cc FROM web_permit WHERE per_num= '" & SESSION("USER_PERMIT") & "'"
>step3_RS.Open step3_SQL, objConn, , adLockOptimistic
>
>If whattodo = "CANCEL" Then
>	step3_RS ("per_stage") = "Cancelled"
>	step3_RS.Update
>
>---------------------------------------------------------------------
>
>
><% @Language=VBScript
><% Option Explicit
><%
>If SESSION("USER_ROLE") <> "PURPLE" Then
>	Response.redirect ("default.asp?timeout=5")
>End If
>
>Session.Timeout=5
>
><!--#include file="connection.asp"-->
><!--#include file="adovbs.inc"-->
><%
>
>Dim step3_RS, step3_SQL
>Set step3_RS=Server.CreateObject("ADODB.Recordset")
>step3_SQL = "SELECT * FROM web_permit WHERE per_num= '" & SESSION("USER_PERMIT") & "'"
>step3_RS.Open step3_SQL, objConn, , adLockOptimistic
>
>If not step3_RS.eof Then
>	step3_RS ("per_stage") = "trial"
>	step3_RS.Update
>
>Slán
>~M
>
>>>hi all
>>>i have the following code. it works on page1.asp perfectly, only updating one record, however on page two it updates most records in the table. this is the exact same code char-4-char on the 2 pages, i am really stumped, any ideas?
>>>
>>>Dim step3_RS, step3_SQL
>>>Set step3_RS=Server.CreateObject("ADODB.Recordset")
>>>step3_SQL = "SELECT per_stage FROM web_permit WHERE per_num= '" & SESSION("USER_PERMIT") & "'"
>>>step3_RS.Open step3_SQL, objConn, , adLockOptimistic
>>>
>>>step3_RS ("per_stage") = "Claimed"
>>>step3_RS.Update
>>>
>>>Slán
>>>~M
>>
>>Mark;
>>
>>You know your needs and application design so I am just voicing my opinion from what I see and know. I can only see this code so I am basing my suggestion upon it. I try to avoid Session.
>>
>>I would not use the Session() in the select statement. Would removing Session be a serious problem?
>>
>>Tom
Previous
Reply
Map
View

Click here to load this message in the networking platform