index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP Report Wizard v2 |
| |||||||
Nov 18 2004, 3:26 AM |
| ||||||
jfle from: Athens, Greece | Hi i am having the following problem. When i have created my default.asp i have never been succcesful to create any report from my SQL database instead i get the following error on the browser: Errors Occured! Error #:-2147467259 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. This is my default.asp <% '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 objWiz, strConnectionString 'initialize your variables strConnectionString = "Provider=MSDASQL;Driver={SQL Server};"& _ "Server= "& SERVER_NAME & ";Database= "& DATABASE_NAME & ";"& _ "User ID= "& USER_NAME & ";Password= "& PASSWORD & ";" Set objWiz = Server.CreateObject("AspWebSolution.ReportWizard2") 'Make sure you initialize before adding any HTML text objWiz.Init(strConnectionString) 'put this where you want your reports objWiz.DisplayReports Set objWiz = Nothing %> My server name is webgrah003 and my user named report. User report has full access on the database named Asset TrackingSQL Please help | ||||||
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] |