| Author |
Topic  |
|
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 06 January 2013 : 13:16:55
|
I was trying to add a new category in the "Auction Mod" and received this error message.
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'chkString'
/tfp/auction_admin.asp, line 174
Here are lines 166 - 181
" </form>" & vbNewLine rs.Close Set rs = Nothing
end select
Sub DoInsert strSQL = "INSERT INTO " & strTablePrefix & "AUCTIONCATEGORIES (CATEGORYNAME, CATEGORYDESCRIPTION) VALUES ('" & chkString(Category, "SQLString") & "', '" & ChkString(request.form("CategoryDescription")) & "')" my_Conn.Execute(strSQL) Response.Write "" & strLang_Auction_01107 & "<br /><br />" & vbNewLine & _ "<a href=""auction_admin.asp"">" & strLang_Auction_01109 & "</a> " & strLang_Auction_01110 & "" & vbNewLine
End Sub
Sub DoUpdate
Your help will be greatly appreciated!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 06 January 2013 13:18:05 |
|
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 06 January 2013 : 16:07:53
|
Add this immediately after that line, run it again and report the output:
Response.Write strSql Response.End |
 |
|
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 06 January 2013 : 19:20:39
|
I received this error, Carefree.
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'chkString'
/tfp/auction_admin.asp, line 174
Here are lines 166 - 183
" </form>" & vbNewLine rs.Close Set rs = Nothing
end select
Sub DoInsert
strSQL = "INSERT INTO " & strTablePrefix & "AUCTIONCATEGORIES (CATEGORYNAME, CATEGORYDESCRIPTION) VALUES ('" & chkString(Category, "SQLString") & "', '" & ChkString(request.form("CategoryDescription")) & "')" Response.Write strSql Response.End my_Conn.Execute(strSQL) Response.Write "" & strLang_Auction_01107 & "<br /><br />" & vbNewLine & _ "<a href=""auction_admin.asp"">" & strLang_Auction_01109 & "</a> " & strLang_Auction_01110 & "" & vbNewLine
End Sub
Sub DoUpdate |
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 06 January 2013 : 20:12:49
|
Chkstring should take 2 arguments, not 1. The 2nd chkstring() function is missing an argument. Add the code in red to the 2nd chkstring.
ChkString(request.form("CategoryDescription"), "SQLString") |
Support Snitz Forums
|
Edited by - Davio on 06 January 2013 20:13:09 |
 |
|
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 06 January 2013 : 20:49:32
|
I was tyring to add the category "Books." What does this error message mean?
INSERT INTO FORUM_AUCTIONCATEGORIES (CATEGORYNAME, CATEGORYDESCRIPTION) VALUES ('Books', ' ')
Did I add the code in the correct place below?
Sub DoInsert
strSQL = "INSERT INTO " & strTablePrefix & "AUCTIONCATEGORIES (CATEGORYNAME, CATEGORYDESCRIPTION) VALUES ('" & chkString(Category, "SQLString") & "', '" & ChkString(request.form("CategoryDescription"), "SQLString") & "')" Response.Write strSql Response.End my_Conn.Execute(strSQL) Response.Write "" & strLang_Auction_01107 & "<br /><br />" & vbNewLine & _ "<a href=""auction_admin.asp"">" & strLang_Auction_01109 & "</a> " & strLang_Auction_01110 & "" & vbNewLine
End Sub |
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 06 January 2013 : 23:33:38
|
quote: Did I add the code in the correct place below?
Yes. Now remove the code Carefree asked you to put in and see if you still get the error. |
Support Snitz Forums
|
Edited by - Davio on 06 January 2013 23:34:16 |
 |
|
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 January 2013 : 00:54:55
|
YEA! That worked! 
Thank you so much, Davio!
You guys are the very BEST!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
| |
Topic  |
|