Avatar of trims30
trims30
 asked on

Connecting MySql to Crystal Reports in VB.Net Environment

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 MySql.data.dll
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:
Code:

 
 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 127.0.0.1:3307 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.

Lee
Crystal ReportsVisual Basic.NETMySQL Server

Avatar of undefined
Last Comment
trims30

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
trims30

ASKER
Yes that works now that I've created a File DSN - had System DSN Before and ODBC wouldn't work.<br /><br />Thank you.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23