Variey item in list box limit quatitiy and compare
Hi, can anybody show me how to do comparison limit item quantity 100 with database?
For example:
noofitem = ("SELECT COUNT(*)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'
apple
__________________
apple
|