A Shot in the Dark - mysql C++ api

A

Aaron Harvey

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.
 
M

Mike Wahler

Aaron Harvey said:
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
 
V

Victor Bazarov

Aaron Harvey said:
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
 
M

Moonlit

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
 
C

Cy Edmunds

Aaron Harvey said:
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.
 
C

Corwin Joy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,039
Messages
2,570,376
Members
47,032
Latest member
OdellBerg4

Latest Threads

Top