I have passed some variables via a querystring to an asp page. The variables are passing ok but when I try to concatenate them into a string sql statement they are not appearing:
For example: -
dim RecordID, callerPage, FlaggerID
-
-
RecordID = Request("edit")
-
callerPage = Request("callerPage")
-
FlaggerID = Request("flagger")
-
-
'Response.Write ("flagger is: " & FlaggerID) '<-------variables will print here!
-
'Response.Write (" / RecordID is : " & RecordID)
-
-
if request("act") = "update" then
-
sql_update = "Update TimeAct set reviewerNotes= '" & replace(request("reviewerNotes"),"'", "''") & "'"
-
sql_update = sql_update & ", Flagged = 1, FlaggerID = " & FlaggerID & ", FlaggedDate = '" & Now() & "' where [ID] = " & RecordID
-
response.Write sql_update '<---------Variables do not show here in this string!
-
response.end
-
conn.Execute sql_update
What am I doing wrong? I've tried using a straight Request("flagger") in the concatenation and that did not work.
Thanks,
cj
4 2067 -
dim RecordID, callerPage, FlaggerID
-
-
RecordID = Request("edit")
-
callerPage = Request("callerPage")
-
FlaggerID = Request("flagger")
-
-
'Response.Write ("flagger is: " & FlaggerID) '<-------variables will print here!
-
'Response.Write (" / RecordID is : " & RecordID)
-
-
if request("act") = "update" then
-
sql_update = "Update TimeAct set reviewerNotes= '" & replace(request("reviewerNotes"),"'", "''") & "'"
-
sql_update = sql_update & ", Flagged = 1, FlaggerID = " & FlaggerID & ", FlaggedDate = '" & Now() & "' where [ID] = " & RecordID
-
response.Write sql_update '<---------Variables do not show here in this string!
-
response.end
-
conn.Execute sql_update
What am I doing wrong? I've tried using a straight Request("flagger") in the concatenation and that did not work.
Thanks,
cj
Are you sure this is happening? If I comment this out, I can get the code to display properly. - if request("act") = "update" then
Are you sure this is happening? If I comment this out, I can get the code to display properly. - if request("act") = "update" then
The SQL output I get is:
Update TimeAct set reviewerNotes= 'ddd', Flagged = 1, FlaggerID = , FlaggedDate = '7/25/2007 2:37:26 PM' where [ID] =
If I change the code to: - sql_update = "Update TimeAct set reviewerNotes= '" & replace(request("reviewerNotes"),"'", "''") & "'"
-
sql_update = sql_update & ", Flagged = 1,
-
FlaggerID = " & Request.Form("FlaggerID") &
-
", FlaggedDate = '" & Now() & "' where [ID] = "
-
& Request.Form("RecordID")
then I can get the ID to pull:
Update TimeAct set reviewerNotes= 'ddd', Flagged = 1, FlaggerID = , FlaggedDate = '7/25/2007 2:37:26 PM' where [ID] = 39987
I am calling the page and passing these values as: - <A ID="<%=flagName%>" HREF="javascript:void();" onClick="popWin('/timesheet_Flag.asp?edit=<%=rs.Fields("ID")%>&callerPage=review&flagger=<% = FlaggerID%>', 'TimesheetFlag', 700,650); return false;">flag</A> <br>
I don't know what is unique to the FlaggerID that the value is not appearing in the derived sql.
Except for the fact that I am not calling your page from a javascript popup, I have copied your code and get the results I would expect. Are you leaving out part of the code? Such as something between lines 8 and 10 that you previously displayed?
just a hunch; do you have option explicit?
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
by: A Ratcliffe |
last post by:
Hopefully just a couple of quick quick questions/responses, but its not
something I've generally had trouble with in the past. Unfortunately, I need
answers ASAP if anyone is available to help.
...
|
by: Wynter |
last post by:
I've been smacking into one brick wall after the next in converting some of my code from ASP Classic to ASP.NET. This one is a real bugger. I use Session Variables to help with User Security. If they...
|
by: Jim Hubbard |
last post by:
It seems that Microsoft not only does not need the classic Visual Basic
developer army (the largest army of developers the world has ever seen), but
now they don't need ANY Windows developer at a...
|
by: ASPfool |
last post by:
Hello everyone,
Please help me before I throw my computer out of the window:
I'm working on a web application in classic ASP (vbscript), which is making
calls to some webservices. The calls...
|
by: jason |
last post by:
i'm working on a gradual conversion of an ASP classic web site to
ASP.NET. a recent body of work involves adding a new asp page to the
existing site. i thought this would be a good opportunity to...
|
by: jason |
last post by:
i'm working on a gradual conversion of an ASP classic web site to
ASP.NET. a recent body of work involves adding a new asp page to the
existing site. i thought this would be a good opportunity to...
|
by: KenLee |
last post by:
I made an application which includes classic asp page and asp.net page.
when I tried to redirect from classic asp page to asp.net 2.0 page, it works
under my local IIS directory.
ex)
<a...
|
by: =?Utf-8?B?UmFnYQ==?= |
last post by:
Hi,
We have found a very freakish ‘truncate’ behavior in Classic ASP application
(that is called from within a web logic portal).
We have an ASP variable, lngOrderId (an oracle sequence...
|
by: Madhusudana Babu |
last post by:
IMy classic ASP app has a global.asa file in the root directory of the app 'SDT'.
I have set an application variable there:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
...
|
by: Jan T. |
last post by:
I wonder if anybody know a web site that has a good tutorial on this
subject.
What I want to do, is make a log in Page, and make sure that all my
pages is validating that the user is loged in...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |