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:

Posted on 2006-11-24
Last Modified: 2012-06-27
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

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?


Question by:farooksg
  • 2
  • 2
LVL 100

Expert Comment

ID: 18008085
Did you try that?  As far as I know htey didn't change the interface very much.


Author Comment

ID: 18009995
yes I tried It gives syntax error and does not work
LVL 100

Expert Comment

ID: 18010190
What version of Crystal?

Is this a new application?


Accepted Solution

farooksg earned 0 total points
ID: 18016130

I found the solution


 Dim li As TableLogOnInfo = New TableLogOnInfo()

            li.ConnectionInfo.ServerName = "servername"
            li.ConnectionInfo.UserID = "userid"
            li.ConnectionInfo.Password = "password"
            CrystalReportViewer1.ReportSource = CrystalReportSource1

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal 2013 - Using Can Grow adds spaces in text 9 54
Not Exists 3 65
Left and Right Trim a field in Crystal Report 2 65
Removing blank spaces between pivot table lines. 12 40
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now