Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I'm newbie in MySQL. I have problem in my project. I want to create report with Crystal Reports 9 and connect to MySQL.
I use Windows 7 32 bit and I've installed MySQL ODBC 3.51 Driver. I've make DSN for mysql in System DSN. My Crystal Report has connect to the DSN.

In my c# code, I have made my connection like this following code :

foreach (CrystalDecisions.CrystalReports.Engine.Table tReport in RptDoc.Database.Tables)
TableLogOnInfo tloi = tReport.LogOnInfo;

tloi.ConnectionInfo.ServerName = "localhost";
tloi.ConnectionInfo.DatabaseName = "ACPHRD";
tloi.ConnectionInfo.UserID = "root";
tloi.ConnectionInfo.Password = "root";


I got the error : Database Logon failed.

Anyone can help me? I don't know how to solve this... :(
Updated 16-Feb-15 23:07pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900