Connecting MySql to Crystal Reports in VB.Net Environment

trims30 used Ask the Experts™
Am attempting to use Crystal Reports with MySql and am having problem connecting to database.

I have done the following:
1. Started new project
2. Added Reference to
3. Created System DSN for My DataBase using MySql Driver - Tests OK
4. Added Form to Project
5. Added CrystalReportViewer to form
6. Create New Report using Crystal Wizard
Create New OLE DB(ADO) Connection
using Mirosoft OLE DB Provider for SQL Server

Here's where I'm getting lost....
Connection info panel asks for Server, User ID, Password and Database
My Connection string that I use in code specifies a Port number as shown below:

 myConnString = "server=" & "LocalHost" & ";" _
            & "Port=" & "3307" & ";" _
            & "user id=" & "root" & ";" _
            & "password=" & "trims30" & ";" _
            & "database=TRIMS_SQL_DATA"

Open in new window

How do I specify Port Number on the connection panel?

I've tried  Localhost:3307 and with no luck.

If I continue without port number then I get error "Logon failed - server does not exist"

I'm stuck at this point... Need help going forward please.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
WHy if you built the ODBC connection are you trying to use OLE for Crystal.  You should be able to use the ODBC connection you built.



Yes that works now that I've created a File DSN - had System DSN Before and ODBC wouldn't work.<br /><br />Thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial