What the Logon Failed, Provider Cannot be Found error is and how to resolve

Last post 02-02-2010 3:45 PM by khurram1. 9 replies.

Sort Posts:

  • What the Logon Failed, Provider Cannot be Found error is and how to resolve

    10-30-2006, 3:46 PM
    • Member
      33 point Member
    • straightener
    • Member since 11-21-2005, 3:45 PM
    • dallas, tx
    • Posts 6

    I wanted to post my problem and solution since I've gotten some good information on this board.   When deploying my Visual Studio 2005 C# .NET 2.0 web application from our QA server to Production, I encountered some problems, which is not unusual.   What was unusual is that two of my four Crystal Reports .NET reports that use the Report Viewer control would not work; they errored out with:

     Exception information:
        Exception type: COMException
        Exception message: Logon failed.
    Details: Error Code: 0x
    Source: ADODB.Connection
    Description: Provider cannot be found. It may not be properly installed.
    Error in File C:\WINDOWS\TEMP\Pie {DA99EAD9-419D-4570-A0D6-AD19CC13D399}.rpt:
    Unable to connect: incorrect log on parameters

    After much research and trial and error, it turns out that I inadvertently used SQL Native Client or SQLNCLI instead of SQLOLEDB in the reports that did NOT work.  Switching these out without recreating the reports involved opening up the report for edit in Visual Studio, right-clicking on the report and choose Database, then Set Database Location, expand the properties node and right click on the provider, and change it to SQLOLEDB.   Follow the rest of the wizard steps to verify the change, test it (of course), save it, then deploy it.   Everything should work fine.

    Bon courage!

    Bret

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    04-23-2007, 12:35 PM
    • Member
      357 point Member
    • Xorcist
    • Member since 11-09-2005, 8:50 PM
    • Posts 182
    Thank you for listing out the solution to your problem, I ran into this very same problem, ad your post just saved me hours of research and debugging. Thanks!
  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    04-26-2007, 10:07 AM
    • Contributor
      2,614 point Contributor
    • jportelas
    • Member since 05-09-2003, 6:07 PM
    • Bogota, Colombia
    • Posts 566

    This is a great idea, publishing the problem and the solution could help many other devs in the community.

    Thanks Bret!

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    06-06-2007, 2:52 AM
    • Member
      2 point Member
    • AnuradhaS
    • Member since 06-06-2007, 6:50 AM
    • Posts 1

    Hi, i m getting the same problem,

    but i m using Dataset, so no setting up provider for it..

    hw can i resolve this?

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    06-12-2007, 4:40 PM
    • Member
      229 point Member
    • pontupo
    • Member since 06-12-2007, 12:30 PM
    • Posts 85

    Thanks so much for posting this! I spent about 5 hours trying to figure out my problem... turned off the automatic posting of the login prompt to get the error that I Google'd which led right back to the forums where I'd been posting looking for a solution.

     In reply to the poster above, I'm not completely sure that I know what Dataset means, but if it's that you are pushing the data set to the Crystal report like so:

    conn = New SqlConnection("server=server;Database=database;Integrated Security=false;User ID=user;Pwd=false")
                query = "SELECT Company.Comp_Name, Opportunity.Oppo_Forecast, Opportunity.oppo_licensetot, Opportunity.oppo_textbooks, Opportunity.oppo_pd, Opportunity.oppo_schoolcare, Opportunity.Oppo_Deleted, Users.User_FirstName, Users.User_LastName, Opportunity.Oppo_Certainty, Opportunity.Oppo_Stage, Opportunity.Oppo_TargetClose, Opportunity.oppo_forcothpipe, Opportunity.Oppo_Status, Users.user_userlocation FROM   (CRM_CLIPRO.dbo.Company Company INNER JOIN CRM_CLIPRO.dbo.Opportunity Opportunity ON Company.Comp_CompanyId=Opportunity.Oppo_PrimaryCompanyId) INNER JOIN CRM_CLIPRO.dbo.Users Users ON Opportunity.Oppo_AssignedUserId=Users.User_UserId WHERE  (Opportunity.Oppo_Stage=N'0-Lead' OR Opportunity.Oppo_Stage=N'1-Contact' OR Opportunity.Oppo_Stage=N'2-Qualified' OR Opportunity.Oppo_Stage=N'3-Developed' OR Opportunity.Oppo_Stage=N'4-Eval/Negotiate' OR Opportunity.Oppo_Stage=N'5-InProcess' OR Opportunity.Oppo_Stage=N'6-Closed') AND Opportunity.Oppo_Deleted IS  NULL  AND (Opportunity.oppo_forcothpipe=N'Forecast' OR Opportunity.oppo_forcothpipe=N'Pipe') AND Opportunity.Oppo_Status=N'In Progress' AND (Opportunity.Oppo_TargetClose>=CONVERT(DATETIME, '2007-04-01 00:00:00', 120) AND Opportunity.Oppo_TargetClose<CONVERT(DATETIME, '2007-07-01 00:00:00', 120)) ORDER BY Users.user_userlocation, Users.User_LastName, Opportunity.oppo_forcothpipe"
                adaptor = New SqlDataAdapter(query, conn)
                dataSet = New Data.DataSet()
                adaptor.Fill(dataSet)
                forepipeq2.SetDataSource(dataSet)
     Then this may actually apply to you. It certainly did in my case anyway. My guess is that even though a number of the parameters in the data connection are accessible (like the server, database, etc.) and/or overwritable... I'm not sure if the type of connection is overwritten. In my case, at any rate, I found that I still had the problem even using the above technique and I still had to change my Crystal Reports to get it to work. *shrug*
  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    06-12-2007, 4:53 PM
    • Member
      33 point Member
    • straightener
    • Member since 11-21-2005, 3:45 PM
    • dallas, tx
    • Posts 6

    AnuradhaS:

    Hi, i m getting the same problem,

    but i m using Dataset, so no setting up provider for it..

    hw can i resolve this?

    Hmmm, if I was using a dataset to populate the report, then the problem is most likely with how you have configured the report in development and then

    when in production something in the production environment is changed or is missing that is causing this.   Can you confirm that you do not have problems in

    development?  Can you post a code snippet for us to evaluate? 

     

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    07-19-2007, 9:53 AM
    • Member
      54 point Member
    • Glyph^
    • Member since 06-05-2007, 3:55 PM
    • Posts 78

    Thank you for this! 

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    10-01-2008, 6:24 PM
    • Member
      2 point Member
    • mgarduno
    • Member since 10-01-2008, 10:07 PM
    • Posts 1

     I found an alternative solution to this problem.

    The reason this error is occurring is because the server is missing the sql native client drivers.

    To correct the problem install the SQL Native drivers.

    You can download it on Microsoft.com here: http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

    The filename is sqlncli.msi

    Run this install on the server to install the SQL Native client drivers and the problem will be resolved.

     Mike

     

     

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    11-26-2009, 2:50 AM
    • Member
      2 point Member
    • Hatinder
    • Member since 11-26-2009, 7:49 AM
    • Posts 1

    Thanks a Lot for the Link. This Solved my problem.

  • Re: What the Logon Failed, Provider Cannot be Found error is and how to resolve

    02-02-2010, 3:45 PM
    • Member
      2 point Member
    • khurram1
    • Member since 07-02-2007, 9:50 AM
    • Posts 1

    Great Thanks, it work's and solved my problem. GOD bless you :) 

Page 1 of 1 (10 items)