www.webdeveloper.com
Results 1 to 3 of 3

Thread: Type mismatch: 'CLng' Error

  1. #1
    Join Date
    Jul 2007
    Posts
    461

    Type mismatch: 'CLng' Error

    Hi I am using Classic ASP and Access. I keep getting this error:

    Type mismatch: 'CLng'

    Is my SQL statement syntax incorrect?

    Code:
    strSQL = "SELECT * FROM Table WHERE id = " & CLng(string)

    Thank you

  2. #2
    Join Date
    Dec 2007
    Location
    Dayton, OH
    Posts
    390
    SQL is correct it's the ASP/VBScript that is crashing

    CLng will crash if you pass it a blank/null/non-numeric value. Also, I believe it will crash if you try to pass in a number exceeds CLngs number range.

  3. #3
    Join Date
    Jul 2007
    Posts
    461
    Ok. Thanks for clearing that up, that really helps alot!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles