February 7th, 2013, 04:39 PM
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 & ";"
strSQL="select userid from users where username ='Bob';"
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.
February 8th, 2013, 08:29 AM
February 18th, 2013, 09:31 PM
I do not see in it sense.