3 Replies - 709 Views - Last Post: 29 November 2012 - 06:32 PM Rate Topic: -----

#1 Ryuhphino  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 05-March 11

Connecting MySQL server to C++

Posted 29 November 2012 - 11:54 AM

I know this topic has spoken about multiple times and i've taken a look at a lot of other topics, as well as looked up videos, mysql pages, ect. and I can't seem to make the connection. I have a pretty well developed program and a complete database using MYSQL command line 5.5. My question is how to get the program to connect with the database? I was looking at This topic and i gained some insight but i'm not sure how i fill out the missing info. My code i've used is exactly like what he has, but i'm supposed to replace some of that with my own info but i'm unsure of what that is. I really need some help with this, so anyone who can help, it would be greatly appreciated! Thanks!!

Is This A Good Question/Topic? 0
  • +

Replies To: Connecting MySQL server to C++

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3635
  • View blog
  • Posts: 5,756
  • Joined: 08-June 10

Re: Connecting MySQL server to C++

Posted 29 November 2012 - 12:40 PM

Hey.

I don't know about the ODBC thing, but MySQL has it's own C++ API you can use. See:
22.4. MySQL Connector/C++

It shouldn't be difficult to set up, although I can't really say that for sure. I've never used MySQL with C++ myself.
Was This Post Helpful? 0
  • +
  • -

#3 Ryuhphino  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 05-March 11

Re: Connecting MySQL server to C++

Posted 29 November 2012 - 05:48 PM

I've downloaded this, but I have no idea how to apply it to my program. Which header files do i need and where and when do I input the information for my database?
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3635
  • View blog
  • Posts: 5,756
  • Joined: 08-June 10

Re: Connecting MySQL server to C++

Posted 29 November 2012 - 06:32 PM

The page I linked to has a LOT of information regarding that. Read through the sub-pages there. All the info you need to use this is in there.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1