index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP Report Wizard v2 |
| |||||||
Nov 19 2004, 7:22 AM |
| ||||||
ghost from: Washington, DC | Are you sure this connection works? try using it on a simple ASP page and let me know if it works e.g. <% 'TODO: Change the constants below to reflect your database settings Const SERVER_NAME = "webgrah003" Const DATABASE_NAME = "Asset TrackingSQL" Const USER_NAME = "report" Const PASSWORD = "report" 'declare your variables Dim Conn, RS, strConnectionString 'initialize your variables strConnectionString = "Provider=MSDASQL;Driver={SQL Server};"& _ "Server= "& SERVER_NAME & ";Database= "& DATABASE_NAME & ";"& _ "User ID= "& USER_NAME & ";Password= "& PASSWORD & ";" Set Conn= Server .CreateObject("ADODB.Connection" ) Conn.Open strConnectionString Set RS = Conn.Execute("SELECT * FROM yourTable" ) If Not RS.OEF Then RS.Close End If Set RS = Nothing Conn.Close Set Conn = Nothing %> ------------------------- Ghost | ||||||
Pages: (1) [1] |