« Previous Next »

Thread: IIS 6 to IIS 7 - DSNless classic ASP connection string need to convert to DSN

Last post 02-04-2009 10:23 AM by mketts. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 02-03-2009, 12:11 PM

    • mketts
    • Not Ranked
    • Joined on 02-03-2009, 11:48 AM
    • Posts 2

    IIS 6 to IIS 7 - DSNless classic ASP connection string need to convert to DSN

    Website recently moved from IIS 6 to II7 environment. I have intermittent connection issues pulling data from my sql server and was informed by my web provider that my DSNless connection string was the issue? Here is a copy of my current connection string:

    set cn=server.createobject("ADODB.CONNECTION")
    cst="Provider=SQLOLEDB.1;Password=password;Persist Security Info=True;User ID=user;Data Source=255.255.255.255;Initial Catalog=agenda"
    set rs=server.createobject("ADODB.RECORDSET")
    cn.open cst
    dvar=(date - 30)
    rs.open "Select * from agenda where agenda='new' order by eventspandate desc",cn,adOpenStatic
        
         while not rs.eof
         if rs("EventSpanDate") > (date - 30) then
         response.write "<a href=new.asp?id=" & rs("id") &">" & rs("title2") & "</a><br><img src=images/spacer.jpg width=5 height=8></img><br>"
         else
         end if
         rs.movenext
         wend
         rs.close
            rs.open "Select * from agenda where agenda='new'",cn,adOpenStatic
         if rs("EventSpanDate") > (date - 30) <> "" then
         response.write "<font size=-7>&nbsp;</font>"
         else
         end if
         
        
         rs.close

    Can anyone tell me how to change this to a DSN connection and if this most likely is the issue..

    Thanks in Advance

  • 02-03-2009, 9:22 PM In reply to

    Re: IIS 6 to IIS 7 - DSNless classic ASP connection string need to convert to DSN

    What's the database platform?

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 02-04-2009, 10:23 AM In reply to

    • mketts
    • Not Ranked
    • Joined on 02-03-2009, 11:48 AM
    • Posts 2

    Re: IIS 6 to IIS 7 - DSNless classic ASP connection string need to convert to DSN

    Sql Server 2000 sp4 with latest hotfix running on Windows server 2003 R2 sp2

Page 1 of 1 (3 items)
Microsoft Communities