index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: error !! data connection :: (5)Post a New Message | Post a Reply
Oct 31 2005, 12:35 PM
 error !! data connection Post a Reply
 zara

View this author's profile Send this author a private message

since: Oct 31, 2005
from: Chile

Hi I am having problem with data connection.
The 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
<%
Const SERVER_NAME = "SERVERASP"
Const DATABASE_NAME = "VDB"
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")  
%>
<html>
<head>
</head>
<meta http-equiv="Content-Type" content="text/html;charset = iso-8859-1">
<body>
     <p>
        <font color="#033f67" size="6"><strong>Test Report </strong></font>
            
        <%
    objWiz.Init(strConnectionString)
    objWiz.DisplayReports
                
       %>
    <table align="center">
     </p>
</body>
</html>

My server name is SERVERASP  and my user name  is report, with full access
Please, help me.
Thank you.






Nov 1 2005, 9:28 AM
 Re: error !! data connection Post a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

You seem to be adding white spaces in your connection string declaration.
Try the code below:

'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")

' always initialize your connection string  before adding any HTML-tags
objWiz.Init(strConnectionString)

%>
<html>
<head>
</head>
<meta http-equiv="Content-Type" content="text/html;charset = iso-8859-1">
<body>
     <p>
        <font color="#033f67" size="6"><strong>Test Report </strong></font>
            
        <%
    objWiz.DisplayReports
    Set objWiz = Nothing            
       %>
    <table align="center">
     </p>
</body>
</html>



-------------------------
Ghost
Nov 2 2005, 3:59 AM
 Re: error !! data connection Post a Reply
 zara

View this author's profile Send this author a private message

since: Oct 31, 2005
from: Chile

Thank you, but  I have this error:
Errors Occured!
Error #:-2147217843
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'report'. Reason: Not associated with a trusted SQL Server connection.
What is the problem ?
The  ASP Report Wizard  have connection ?
Thank you.

Nov 2 2005, 11:25 AM
 Re: error !! data connection Post a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

Are you sure that your username and password combination is correct?
Have you tried that same combination to open a connection string in ASP?

Dim Conn, RS
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open YOUR_CONNECTION_STRING
'Set RS = Conn.Execute ("SELECT * FROM YOUR_TABLE")
'RS.Close
'Set RS = Nothing

Close
Set Conn = Nothing



-------------------------
Ghost
Nov 3 2005, 5:26 AM
 Re: error !! data connection Post a Reply
 zara

View this author's profile Send this author a private message

since: Oct 31, 2005
from: Chile

thank you, the problem was solved !!


Pages: (1)   [1]

search this forum: