IIS 5.0 and ADO

Results 1 to 2 of 2

Thread: IIS 5.0 and ADO

  1. #1
    Join Date
    Dec 1969

    Default IIS 5.0 and ADO

    Hi, <BR>I wonder if anyone has had this problem. I have noticed that <BR>my connection method (see below ) to a SQL database doesn&#039;t function on <BR>Win2000 server. Below is the global.asa file where i have specified the connection... <BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062; <BR>Sub Application_OnStart <BR>&#039;--Project Data Connection <BR>Application "AIConnection_ConnectionString") <BR>"DSN=xxxx;DATABASE=xxxxx" <BR>Application("AIConnection_ConnectionTimeout" ) = 15 <BR>Application("AIConnection_CommandTimeout") = 30 <BR>Application("AIConnection_CursorLocation") = 3 <BR>Application("AIConnection_RuntimeUserName") = "xxxx" <BR>Application("AIConnection_RuntimePassword") = "xxxxx" <BR>Application("AIConnection_HomePromoAge") = "15" <BR>&#039;Set the secure WWW server URL <BR>Application("SecureServerURL") = "" <BR>End Sub <BR>Sub Session_OnStart <BR>Session("CookiesEnabled") = "Yes" <BR>End Sub <BR>&#060;/SCRIPT&#062; <BR><BR>..... and here is the code where we call on the connection. <BR><BR>Set oConnection = Server.CreateObject("ADODB.Connection") <BR>oConnection.Open Application("AIConnection_ConnectionString"), _ <BR>Application("AIConnection_RuntimeUserName"), _ <BR>application("AIConnection_RuntimePassword"), _ <BR>sqlstr = "" <BR>sqlstr = "select xxx ,xxx from xxxx where xxxx = &#039;" & (xxx) & "&#039; and xxxx = &#039;" & (xxxxx)&"&#039;" <BR>Set oRecordSet = oConnection.Execute(sqlstr) <BR>Do While Not oRecordSet.EOF <BR>xxxx =Rtrim(oRecordSet("xxxx")) <BR>oRecordSet.MoveNext <BR>loop <BR><BR>... Now this method works fine on IIS4.0 on NT Server but i get <BR>the following error on IIS5.0 &#062;&#062;&#062;&#062;&#062; <BR><BR>Driver or dsn connection not specified. <BR><BR>Lastly, i have added in these missing items (driver ref, dsn) in the string but it still comes up with this error. I wonder if ADO is to blame or if the SQL driver in IIS5.0 doesn&#039;t accept these parameter, any advice would be appreciated ! <BR><BR>Thanks for reading this epilogue !!!

  2. #2
    Join Date
    Dec 1969

    Default RE: IIS 5.0 and ADO

    Sounds like you didn&#039;t set up a DSN on your new server. Go to the ODBC control panel and set it up with your DSN name.

Posting Permissions

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