By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,299 Members | 1,510 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,299 IT Pros & Developers. It's quick & easy.

A Shot in the Dark - mysql C++ api

P: n/a
I don't know if anyone knows anything about programming C++ to do mysql
database manipulation, but here it goes anyway ... I'm getting desperate
to find a solution.

I'm going absolutely freakin insane trying to figure out how to program
with mysql in Visual Studio 6.0. There's no official support for it that
I can see, and I'm having issues with mysql++ ... so much so that I've
*attempted* to install and use a unix system, although that just further
compounded my frustration ... and the book I have on mysql c apis has a
chapter on php (wtf, php needed a chapter, it's like the easiest of the
bunch to use to manipulate databases), a C api and a java api ... which
I'm not really interested in coding in as the file writing system sucks
IMO.

Anyway, I thought I got it working .. until I tried adding some code
beyond just connecting to the database I have running on my windows
machine and I ended up with something along the lines of 36 errors. So I
started a new project, followed the readme for mysql++ api to the 'T'
pulled out one of their examples, compiled and got 36 errors again,
about that time I wanted to just start throwing crap as this problem has
stopped me from moving forward at all with this programming project I've
been working on. All of the tutorials I've found are cryptic at best,
downright confusing and meaningless at worst.

I might be attempting to figure out FreeBSD which may or may not help as
I finished downloading it ... just waiting till Saturday to get a book
from Books a Million on it since they have a 20% off storewide sale.

Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Aaron Harvey" <sp**@mehere.com> wrote in message
news:W7********************@comcast.com...
I don't know if anyone knows anything about programming C++ to do mysql
database manipulation, but here it goes anyway ... I'm getting desperate
to find a solution.

I'm going absolutely freakin insane trying to figure out how to program
with mysql in Visual Studio 6.0. There's no official support for it that
I can see, and I'm having issues with mysql++ ... so much so that I've
*attempted* to install and use a unix system, although that just further
compounded my frustration ... and the book I have on mysql c apis has a
chapter on php (wtf, php needed a chapter, it's like the easiest of the
bunch to use to manipulate databases), a C api and a java api ... which
I'm not really interested in coding in as the file writing system sucks
IMO.

Anyway, I thought I got it working .. until I tried adding some code
beyond just connecting to the database I have running on my windows
machine and I ended up with something along the lines of 36 errors. So I
started a new project, followed the readme for mysql++ api to the 'T'
pulled out one of their examples, compiled and got 36 errors again,
about that time I wanted to just start throwing crap as this problem has
stopped me from moving forward at all with this programming project I've
been working on. All of the tutorials I've found are cryptic at best,
downright confusing and meaningless at worst.

I might be attempting to figure out FreeBSD which may or may not help as
I finished downloading it ... just waiting till Saturday to get a book
from Books a Million on it since they have a 20% off storewide sale.


I see on the mysql site that they have tech support
mailing lists. Why not try those? E.g:
http://lists.mysql.com/list.php?list=win32&sub=1

-Mike
Jul 19 '05 #2

P: n/a
"Aaron Harvey" <sp**@mehere.com> wrote...
I don't know if anyone knows anything about programming C++ to do mysql
database manipulation, but [...]


Perhaps you've chosen not the best way to explain your problem. Try
to start over and before you post again, read the FAQ, section 5.
You can find FAQ here: http://www.parashift.com/c++-faq-lite/ . You
seem to need an answer to question 5.8. But don't skip the rest,
plenty of good information there.

Victor
Jul 19 '05 #3

P: n/a
Hi,

Accessing the mysql database from a unix system is quite easy (with C
calls). If you want I can send you some code I used.

Accessing it from a (remote) windows system should also work at least with
the mysql ODBC drivers (I tried it once and it worked however it was only a
test to see if I could make it work).

I never tried the mysql++ api though, I just use the C calls (it are only a
few calls and you can wrap them yourself in some C++ classes).

Regards, Ron AF Greve

"Aaron Harvey" <sp**@mehere.com> wrote in message
news:W7********************@comcast.com...
I don't know if anyone knows anything about programming C++ to do mysql
database manipulation, but here it goes anyway ... I'm getting desperate
to find a solution.

I'm going absolutely freakin insane trying to figure out how to program
with mysql in Visual Studio 6.0. There's no official support for it that
I can see, and I'm having issues with mysql++ ... so much so that I've
*attempted* to install and use a unix system, although that just further
compounded my frustration ... and the book I have on mysql c apis has a
chapter on php (wtf, php needed a chapter, it's like the easiest of the
bunch to use to manipulate databases), a C api and a java api ... which
I'm not really interested in coding in as the file writing system sucks
IMO.

Anyway, I thought I got it working .. until I tried adding some code
beyond just connecting to the database I have running on my windows
machine and I ended up with something along the lines of 36 errors. So I
started a new project, followed the readme for mysql++ api to the 'T'
pulled out one of their examples, compiled and got 36 errors again,
about that time I wanted to just start throwing crap as this problem has
stopped me from moving forward at all with this programming project I've
been working on. All of the tutorials I've found are cryptic at best,
downright confusing and meaningless at worst.

I might be attempting to figure out FreeBSD which may or may not help as
I finished downloading it ... just waiting till Saturday to get a book
from Books a Million on it since they have a 20% off storewide sale.

Jul 19 '05 #4

P: n/a
"Aaron Harvey" <sp**@mehere.com> wrote in message
news:W7********************@comcast.com...
I don't know if anyone knows anything about programming C++ to do mysql
database manipulation, but here it goes anyway ... I'm getting desperate
to find a solution.

I'm going absolutely freakin insane trying to figure out how to program
with mysql in Visual Studio 6.0. There's no official support for it that
I can see, and I'm having issues with mysql++ ... so much so that I've
*attempted* to install and use a unix system, although that just further
compounded my frustration ... and the book I have on mysql c apis has a
chapter on php (wtf, php needed a chapter, it's like the easiest of the
bunch to use to manipulate databases), a C api and a java api ... which
I'm not really interested in coding in as the file writing system sucks
IMO.

Anyway, I thought I got it working .. until I tried adding some code
beyond just connecting to the database I have running on my windows
machine and I ended up with something along the lines of 36 errors. So I
started a new project, followed the readme for mysql++ api to the 'T'
pulled out one of their examples, compiled and got 36 errors again,
about that time I wanted to just start throwing crap as this problem has
stopped me from moving forward at all with this programming project I've
been working on. All of the tutorials I've found are cryptic at best,
downright confusing and meaningless at worst.

I might be attempting to figure out FreeBSD which may or may not help as
I finished downloading it ... just waiting till Saturday to get a book
from Books a Million on it since they have a 20% off storewide sale.


I run mysql on a unix box but in Python rather than C++. As much as I love
C++ I must say the Python route was extremely easy.

--
Cy
http://home.rochester.rr.com/cyhome/
Jul 19 '05 #5

P: n/a
The answer here is going to depend on what you are trying to do.
1. Are you locked into the mySQL api or are you able to use a more
general non database proprietary protocol?

2. Do you need to run on both Windows & Unix?

If you want a general C++ database library that runs against mySQL on
Windows and Unix you could look at:

Database Template Library: STL type interface for databases - uses
mySQL ODBC interface:
http://dtemplatelib.sourceforge.net/index.htm

OTL: Streams interface for databases:
http://otl.sourceforge.net/home.htm

Other possibilities include wxWindows.
Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.