CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2012

    Question Crystal Report not connecting to MySQL

    My Project is successfully running,. it can even load the data onto my tables from MySQL database
    but the problem is,. when i open my reports which is CrystalReport based,. it prompts for a Database Login,. I am using Windows 7 64bit and Visual Basic 2008 with the latest MySQL Server.

    On my CrystalReport1.rpt when i click the Main Report Preview,.
    ODBC (RDO) pops up asking for Data Source Selection,. i tried filling up the connection String with:

    "DRIVER={MySQL ODBC 3.51 Driver};DATABASE=sms;OPTION=3; SERVER=localhost;UID=sms;PWD=sms;"

    still, it asks for Connection Information
    I inputted
    Server: localhost
    User ID: sms
    Password: sms
    Database: sms

    when i click Finish,. there is an error telling,.

    Logon Failed.
    Details: IM002:[Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified.

  2. #2
    Join Date
    Jan 2006
    Fox Lake, IL

    Re: Crystal Report not connecting to MySQL

    It's telling you 4 things, but start by searching for these:

    Data Source name not found

    And also:

    No default driver specified

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2000
    Milano, Italy

    Re: Crystal Report not connecting to MySQL

    DGlienna told you: you might not have MySQL driver.
    have a look here:

    By the way: you might have a matter between 64 and 32 bit: if you have the 32 bit of driver, you must compile x86
    while you have the 64 bit dirver, you must compile for anycpu (x64) to make it work on your machine. I do believe you can not install both x64 and x32 drivers of mySql on same machine.
    about this, have a look here:

    you might not have set up the correct connection string
    have a look here

    you might have a matter of login (username and password)

    the fourth problem I was not able to see (unless it was the x32 and x64 matter) but:
    User ID: sms
    Password: sms
    Database: sms
    same db name, same username? PPassword is a matter of yours, but I do not like same dbName and same Username...
    Last edited by Cimperiali; March 21st, 2012 at 04:46 AM.
    ...at present time, using mainly Net 4.0, Vs 2010

    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.