Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'sa'. SQL State: 42000 Native Error:

HI iam using crystal report in my web application iam usin Visual Studio 2005

when I run this report in my web page using crystal report viewer iam getting the above error

 CrystalReportViewer1.ReportSource = CrystalReportSource1
        CrystalReportViewer1.DataBind()

how to set the database logon user id and passwd in my web page

in 2003 i know oRpt.SetDatabaseLogon("sa", "password") your can do this

how about in 2005?

Thanks


farooksgAsked:
Who is Participating?
 
farooksgAuthor Commented:
hi

I found the solution


Thanks

 Dim li As TableLogOnInfo = New TableLogOnInfo()


            li.ConnectionInfo.ServerName = "servername"
            li.ConnectionInfo.UserID = "userid"
            li.ConnectionInfo.Password = "password"
            CrystalReportViewer1.ReportSource = CrystalReportSource1
            CrystalReportViewer1.LogOnInfo.Add(li)
0
 
mlmccCommented:
Did you try that?  As far as I know htey didn't change the interface very much.

mlmcc
0
 
farooksgAuthor Commented:
yes I tried It gives syntax error and does not work
0
 
mlmccCommented:
What version of Crystal?

Is this a new application?

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.