urgent help!!

Results 1 to 6 of 6

Thread: urgent help!!

  1. #1
    Al Bear Guest

    Default urgent help!!

    I have a data type critera miss match. The page things all my varables are text and not numbers is there a way to force the varables to be numbers and not text????

  2. #2
    MutantFish Guest

    Default RE: urgent help!!

    Hi Al, <BR>Without seeing your code, its a little tricky to know exactly what you&#039;re doing, so this may not be the problem, but:<BR><BR>strThisIsATextString = "This is a text string"<BR>intThisIsANumber = 1<BR><BR>As you can see from the two lines above, the string is surrounded with double quotes (the ones above the number 2 on your keyboard), and the number isn&#039;t. <BR><BR>HTH<BR>MutantFish

  3. #3
    kevin Guest

    Default RE: urgent help!!

    Check the place where they are entered by doing a isnumeric() check on them. or to force a string to become a number in Asp or vbscript use cint(number)

  4. #4
    Al Bear Guest

    Default More Info

    What I have is a request("value") which is a number, which has come from a check box on a form. but when using it in an SQL insert statment there is a missmatch as the page thinks the requst value is a text file but I need it to be a number any ideas... <BR><BR>will this work???<BR>request("q1") = varq1 <BR>varq1 = cint(varq1)<BR>

  5. #5
    Eddie Campbell Guest

    Default Back to front

    This would work<BR><BR>varq1 = Cint(Request("q1"))<BR><BR>

  6. #6
    Vijaya Seshan Guest

    Default RE: Back to front

    Now when you want to construct a insert statement use the following syntax:<BR>sqlStr = "insert into tablename (q1) values (" & varq1 &")"

Posting Permissions

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