Connecting Mysql through Visual C++
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Connecting Mysql through Visual C++

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    Connecting Mysql through Visual C++

    I am new to C++ development. I am having a tough time understanding how to connect Mysql Database using visual c++ windows forms application in visual studio 2008.

    I tried with oledbconnection,but unable to connect to database.

    Can anyone offer some step by step advice to get me moving

    Thanks in advance...

  2. #2
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,538

    Re: Connecting Mysql through Visual C++

    If you search the Visual C++ forum for the following you will find about 50+ threads on this subject...while most of the results are directed to SQL Server most of the syntax for connecting/talking to the DB is uniform across ADO, ODBC, OLEDB...

    "connect Mysql Database using visual c++"
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

  3. #3
    Join Date
    Feb 2011
    Posts
    3

    Re: Connecting Mysql through Visual C++

    Hi Vanaj,

    Thanks for your reply..

    If i search for that "connect Mysql Database using visual c++" most of the solutions are showing for console applications. But i need to connect to Mysql using windows forms application..

    I tried using the code given in attachment vc++.txt:



    when i run this code in a windows forms project i am getting nothing in DataGridview in my form.Even no errors are showing....Is there any error in OledbConnection?
    Attached Files Attached Files

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: Connecting Mysql through Visual C++

    "a windows forms project" does not belong to Visual C++ Programming.
    Instead it is something like managed C++/CLI programming. So try to ask on the appropriate forum!
    Victor Nijegorodov

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

This is a CodeGuru survey question.


Featured


HTML5 Development Center