|
| |
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
What is wrong with this code? - 9/24/2004 11:31:07
if Request.Form("ea1")="" Then ea1 = "0" else ea1 = Request.Form("ea1") end if if Request.Form("Qty1")="" Then Qty1 = "0" else qty1=Request.Form("Qty1") end if and then I am donig this later ', Total1 = '" & "$" & ea1 * Qty1 & "'," I am getting the following error Microsoft VBScript runtime error '800a000d' Type mismatch: '[string: " "]' /so/sochangeall2.asp, line 373
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 9/24/2004 12:09:06
I changed it, now I get the same error, but on the line if Request.Form("ea2") >1 Then This is happening when I leave the text box blank, so it is a null sql value, right?
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 9/27/2004 11:58:16
I set up a page that displayed the results on 1 item. If I leave the field blank, it displays nothing, if I put a 1 in the field, it displays the one, if I hit back and delete the 1, it displays a 0 like it is suppose to. So if I load the page and the field is blank, that is when it returns nothing, does that make sense?? Thanks for the help.
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 9/27/2004 15:38:10
Not set to 0 Qty not set to 0
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 9/29/2004 10:32:31
Anyone have any ideas on this??
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/7/2004 10:29:04
Is this the right syntax? response.write ', Total1 = '" & "$" & ea1 "-" Qty1 & "',"
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 11:33:57
One thing I might add is that these fields have been written too already. The SQL value is null
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 14:24:41
Microsoft VBScript compilation error '800a0401' Expected end of statement /so/changetest.asp, line 20 response.write "Total1 = '" & "$" & ea1 "-" & Qty1 & "'," ----------------------------------------^
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 14:29:07
Here is the response Total1 = '$-'
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 14:39:03
Here is the post page <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 2</title> </head> <% response.write "Total1 = '$" & ea1 &"-" & Qty1 & "'" %> <body> </body> </html> Do need any of the first page?
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 15:21:01
The originating page is a Form with Database results region. Here is a link I am not sure of that link will work or help out. I am testing the code in the post (action) page!??!
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 16:37:30
I will try to make it simple. I have a form with 1 text box. Wehn you submit, it does to an asp page, something like this: Sql = "UPDATE SalesOrder SET Notes = '" & Request.Form("Notes") & "'," sql = sql & Request.form("qty1") & "', qty2 = '" & Request.form("qty2") & "'," & "' WHERE ID Like '" & ID & "'" fp_conn.execute(sql) This all works fine. So then I have another page, which is a form that displays the text boxes with the sql data. This is an example of the text boxes: <%=FP_FieldVal(fp_rs,"Qty1")%> On this page, I want the emplyee to be able to update the text boxes if needed. On the submit from this page I do the same as about on an ASP page. These 2 pages are where I am having troubles. if the <%=FP_FieldVal(fp_rs,"Qty1")%> text box is left blank, that is when I get the error on the submitted ASP page. Does that make any sense?
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/11/2004 16:50:33
No I will try that. By the way what does the cInt do?
|
|
|
|
chadb
Posts: 485 From: Kansas Status: offline
|
RE: What is wrong with this code? - 10/12/2004 9:50:47
OK Here is the problem now: Microsoft VBScript runtime error '800a000d' Type mismatch: 'cInt' /so/sochangeall2.asp, line 121 Line 121 is ea1 = cInt(Request.Form("ea1"))
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|