dparson,
Hi, Nice to meet you. Just want to ask you do u do before limit quantity in ASP? I have problem like this:
How to do comparison limit item quantity 100 with database?
For example:
noofitem = ("SELECT SUM(*)FROM table1 where Typeofrequest = @Typeofrequest and Name=@name and DateRequire = getdate() group by Typeofrequest")
if noofitem <= 100 Then
else
Response.write("Error! 100 items only can key in!")
sql = ("INSERT INTO table1 ( Name, Typeofrequest, Noofitem,Description, Priority, DateRequire) VALUES ('"& request.form("name") &"','"& request.form("typeofrequest") &"','"& request.form("typeofrequest.noofitem") &"','"& request.form("description") &"','"& request.form("status") &"','"& request.form("date") &"')")
end if
1. First of all i want let user key in untill 100 item. If compare less than 100 item, then SQL insert will proceed. If not the msgbox exist to block database insert information.
2. My problem is exist Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'noofitem'
Thanks.
apple
apple
|