• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 12228
  • Last Modified:

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


0
farooksg
Asked:
farooksg
  • 2
  • 2
1 Solution
 
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
 
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
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.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now