Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 18th, 2007, 02:25 AM
Authorized User
Join Date: Jun 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


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'


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare select box Dj Kat Javascript How-To 4 November 15th, 2007 11:03 AM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
list box item moved up and down with focus valentine Classic ASP Basics 0 August 2nd, 2005 07:50 AM
Want Combo Box first item if only 1 item markw707 Access 3 June 9th, 2004 04:03 PM
limit rows returned in a list box stoneman Access 1 January 16th, 2004 10:46 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.