We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Moving ASP Website [Answered]RSS

3 replies

Last post Feb 04, 2008 09:00 AM by tomkmvp

  • Moving ASP Website

    Feb 01, 2008 10:28 AM|dmcquade|LINK

    Hey everyone,

     I recently moved a website from a shared host to a dedicated server.  Everything looks fine but I am having variable problems.  When I am assigning or doing comparisons on some of my variables I'm getting errors for incompatible types.

     Previously my code worked fine:

     sSQL = "select count(*) as count_records from test"

    set rs=con.execute(sSQL)

         if rs("count_records") = 0 then

              ... code ...

        end if

    rs.Close

     

    But now it errors.  After playing around with it I was able to get this to work:

     

     sSQL = "select count(*) as count_records from test"

    set rs=con.execute(sSQL)

         if rs("count_records") = "0" then

              ... code ...

        end if

    rs.Close

     

    I have a lot of pages and the decode line indicators are spotty at best.  I would really like to simply change a property that can allow my old code to run. 

     Any ideas?

  • Re: Moving ASP Website

    Feb 01, 2008 08:46 PM|jeff@zina.com|LINK

    Looks like your database field types may be different in the new server.

    Jeff

    Have you Binged a solution before posting?
  • Re: Moving ASP Website

    Feb 01, 2008 09:32 PM|dmcquade|LINK

    The database (structure) is identical to the previous system.  That being said, it is possible that the type of the fields being passed back could be different based on some setting.  I'll take a look.

  • Re: Moving ASP Website

    Feb 04, 2008 09:00 AM|tomkmvp|LINK

    What database are you using?  What does your connection string look like?