CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> ASP

 Barcodes search error

Print topic Send  topic

Author Message

Posts: 50
Posted: 11/18/2009, 1:11 AM


I have a simple grid with products and their barcodes and a search form. The barcodes are 13 characters lenght. If I try try to search after a barcode I get:

Microsoft VBScript runtime error '800a0006'
Overflow: 'CLng'
Common.asp, line 1540

where I have
If DataType = ccsInteger Then
Result = CLng(NumberVal)

Any clue?
View profile  Send private message

Posts: 154
Posted: 11/18/2009, 11:36 AM

According to documentation, the value you pass to CLng() must be a number between -2147483648 and 2147483647. ( This range is likely to be exceeded by a 13 digit code (unless it has a lot of leading zeros), hence the overflow error.

If the table column that contains the barcode is numeric, then I think choosing Float instead of Integer as the Data Type of the search form text box will fix it. You may also need to change the 'Type' of the Where parameter of the Grid Data Source.

Another solution might be to put the barcode into a text column in the database, as you would with telephone numbers.
View profile  Send private message

Posts: 50
Posted: 11/18/2009, 10:49 PM

Thanks for your reply...I tried this approach but I mistakenly forgot to change the search parameter from integer to text :-).

Now it's ok.

Best regards
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.