CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Barcodes search error

Print topic Send  topic

Author Message
Dorin

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

Hello,

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?
thanks
View profile  Send private message
andrewi

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. (http://www.virtualsplat.com/tips/asp-function-clng.asp). 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
Dorin

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 http://support.yessoftware.com.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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