Home > front end >  ASP multibit comparison problems
ASP multibit comparison problems

Time:05-17


I have a set of values (numerical source is the qr code more digits) need to compare, aa values, not less than the value of bb, also is not greater than the value of the cc,

<% % aa="180643132060000011" & gt; , form values
<% % bb="18064313206000001" & gt; , the database value
<% % cc="18064313206000500" & gt; , the database value

I try to directly compare, sometimes appear error judgment
<% if aa & gt; Bb and aa & lt; Cc then % & gt;
Right
<% % the Else & gt;
Greater than or less than the database numerical section
<% End If % & gt;

Trouble master to give guidance, thank

CodePudding user response:

Data types are string, right? Estimate the result you should be according to comparing the ASCII value of the string, rather than by comparing numerical add a CDbl try

CodePudding user response:

The
reference 1/f, dream in the wind uplift response:
data types are string, right? Estimate the result you should be according to comparing the ASCII value of the string, rather than by comparing numerical add a CDbl try


Added, the effect is same, numeric digits is too long, so now very headache

CodePudding user response:

Then you can see the numerical can have any rule to see capture several comparison, after is not according to digit length comparison, if different, it returns digits long, if the same, then a comparison step by step from beginning to end

CodePudding user response:

Digits comparison could be made because the database of them roughly, product 1 May be 15, the product may be 17, of 2 digits, and the content of randomness is stronger, js can add BigInt do judgment, but there were no ASP works,
  •  Tags:  
  • ASP
  • Related