RE: Aborted Result in simple Query

2003-06-17 Thread M. Bader
Hello Shane,

 I found nothing better than the standard
 MySQL C API standard with MySQL.

That's true. I read it now i find it very easy in comparison to the C++
documents.
This one reminds me of PHP functions a lot.

 I have made 2 such classes, which are quite
 simple, not a significant ammount of error checking, or
 functionality, but
 ResultSet's and Queries can be made.

 If you are interested in my classes, I'd be happy to pack them
 up for you to

That whould be very kind of you mate. Allthough i tried to use the C-API
now, i'm still getting some errors, that dont now know of why they occure.
It whould be alot easier to one complete example to get a glue of how to
start  in C/C++.

 use, I only ask the headers be kept in the code.

if you wish so, of course.

Thanks a lot,
Maik


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Aborted Result in simple Query

2003-06-16 Thread Shane Bryldt
Hello Mr Bader,

A simple answer to this solution, after all my own searches for a good
API to communicate with MySQL, I found nothing better than the standard
MySQL C API standard with MySQL.  The calls are not at all cryptic, the
functionality is quite featureful (including escaping strings for mysql,
bless the MySQL team for adding something so simple) while having less
overhead than most of the C++ API's I've seen.  And in truth, it's not
difficult to write a couple little classes which can encapsulate simple
functionality quite easily.  I have made 2 such classes, which are quite
simple, not a significant ammount of error checking, or functionality, but
ResultSet's and Queries can be made.

If you are interested in my classes, I'd be happy to pack them up for you to
use, I only ask the headers be kept in the code.

My final jump onto the C API, was the extended documentation.  The MySQL
team has documented it on the website very well, and you don't need to
install anything extra for the library, since it comes with MySQL.

Hope that helps,
-Shane
- Original Message - 
From: M. Bader [EMAIL PROTECTED]
To: mysql Mailing Liste [EMAIL PROTECTED]
Sent: Monday, June 16, 2003 2:54 PM
Subject: Aborted Result in simple Query


 Hi all,

 this _my_ simple problem: I wrote a little c++ programm in linux using
 the plusplus api

 My purpose was to create a simple interface to mysql. Programmer uses my
 class, gives a sql-string and gets a pointer to the result array wich my
 class creates out of the result set.

 this is a shortened part of my scripts:
 [...]
 Query* q = new Query(conn);
 [...]

 bool myConn::runQuery(char *sql)
 {
 (*q)  sql;
 cout  q-preview()  endl;
 cout  one  endl;
 Result res = q-store();
 cout  two  endl;
 [...]
 }

 and the following is the output:
 [...]
 SELECT name FROM test;
 one
 Aborted

 ...that's it.

 If I try to get out what's wrong by
 try{ [...] }
 catch(BadQuery er) { cout  er.error; }

 i'll only receive cryptic symbols (like a misplaced pointer)

 So here are my questions:
 1. Is there any way to get out correctly what's wrong?
 2. Is there any good(!) description of the mySQL C++ API?
 (http://www.mysql.com/documentation/mysql++/index.html is horrific!)

 Best regards

 M. Bader


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]