Referencing Values through HREF??????

Results 1 to 3 of 3

Thread: Referencing Values through HREF??????

  1. #1
    Pauly Guest

    Default Referencing Values through HREF??????

    How is numeric data stored in the QueryString?<BR><BR>I have the a href giving me a ..somewhere.asp?num=6<BR><BR>but I keep getting mismatch values or am unable to match that value even though the number is in my database.<BR><BR>Please Help Me!!

  2. #2
    ActiveALLI OZ.COM Guest

    Default RE: Referencing Values through HREF??????

    A value in a QueryStruing is always a String data type<BR>use cint() to convert to integer or clng() to convert to long<BR>Example<BR>dim varHref<BR>varHref = cint(Request.QueryString("num"))<BR><BR>varHref now contains the number 6 with the data type integer.<BR><BR>one other thing if you write your SELECT Statement without a &#039&#039 then the Database will asume you are using a integer<BR>so SELECT * FROM TABLE WHERE SOMETHING = " & Request.QueryString("num") would valid where the Field Something contains int data types<BR>but SELECT * FROM TABLE WHERE SOMETHING = &#039" & Request.QueryString("num") & "&#039"<BR>Would be valid if the Field Something holds String Values .. <BR><BR><BR>&#039&#039 = Single Quotes

  3. #3
    Join Date
    Dec 1969
    Posts
    18

    Default RE: Referencing Values through HREF??????

    You must have done something wrong. Check your datatype for the field you&#039re trying to match. Numeric data in querystring store about normal numeric data.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •