Results 1 to 3 of 3

Thread: Connecting Crystal Reports to MySql in vb.net

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Posts
    99

    Connecting Crystal Reports to MySql in vb.net

    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"
    How do I specify Port Number on the connection panel?
    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

  2. #2
    New Member DJHassselmann's Avatar
    Join Date
    Dec 2024
    Posts
    8

    Re: Connecting Crystal Reports to MySql in vb.net

    Hi, you should use port 3306 and not 3307 as you are using

  3. #3
    Junior Member
    Join Date
    Dec 2024
    Posts
    16

    Re: Connecting Crystal Reports to MySql in vb.net

    However, it’s worth noting that sometimes MySQL can be configured to run on a different port, like 3307, especially if there’s another service using the default port. Lee, make sure to double-check your MySQL server settings to confirm the correct port. If 3307 is what you’re using, you might need to specify it directly in your connection settings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width