#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    Variables not workind as expected (as they used to) in ASP with a new host


    About two years ago I had a website that worked fine. It went offline for a while as I neglected it and didnt continue paying the hosting service. However, the code was still in fine working order.
    There is no reason why, when I started up again with a new hosting service, it wouldnt work.

    Well, I started up again (this time with GoDaddy - I was with some other host previously) and the code works except for the way it is handling variables.

    Now, admittedly, I was not strict with my variables. I didnt use option explicit. In addition, I had code that worked just fine, as in the made up example below:

    <%
    CONST_ID = 5
    strSQL="select username from users where userid=" & CONST_ID & ";"
    %>

    or

    <%
    intMyID=10
    strSQL="select userid from users where username ='Bob';"
    objRS.Open strSQL,objConn

    If objRS("username") = intMyID Then Response.Write "Hello"
    %>


    Both of these kinds of things worked before. Now, on GoDaddy, I get "Type Mismatch" errors.

    I need to wrap everything in Cstr or Cint in order for it to work.

    But, doing this throughout the entire site will be a nightmare. There are hundreds of functions.

    Does anyone know what happened here? Is there an easy solution? Why did it work before but not now?

    Any help would be greatly appreciated.

    Thankks
  2. #2
  3. No Profile Picture
    Moderator
    ASP Mastermind (5000+ posts)

    Join Date
    Feb 2004
    Location
    Reston, VA
    Posts
    13,248
    Rep Power
    1907
    See this thread: iis7, classic asp; type mismatch error - Stack Overflow. This very well could be your case since you were on a different server and haven't had the app up in a while. I would imagine that GoDaddy have more updated servers with this fix applied.
    jmurrayhead
  4. #3
  5. No Profile Picture
    Registered User

    Join Date
    Oct 2012
    Location
    Russia
    Posts
    8
    Rep Power
    0
    I do not see in it sense.

Similar Threads

  1. Apple to host event, new iPad expected (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: February 28th, 2012, 01:00 PM
  2. Apple to host conference in June: new iPhone expected (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: April 28th, 2010, 02:00 PM
  3. Apple to host conference in June; new iPhone expected (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: April 28th, 2010, 12:00 PM
  4. Apple to host event January 27, tablet expected (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: January 18th, 2010, 07:03 PM
  5. Apple to host event January 27, tablet expected (Reuters)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: January 18th, 2010, 04:04 PM

IMN logo majestic logo threadwatch logo seochat tools logo