List:MySQL++« Previous MessageNext Message »
From:Alex Date:September 15 2008 5:45am
Subject:Re: program got stuck while executing with mysql++
View as plain text  
Please try not to doublepost messages. Also, a pastebin like
http://www.rafb.net/paste is better than a formatted email. :)

2008/9/15 manish <manish@stripped>:
> Dear
>        I have following problem with mysql++ and visual studio2008 professional
> edition.
> My program code is like this ...which is just replica of what the example provided by
> mysql++.
> #include <mysql++.h>
>
> #include <iostream>
>
> #include <iomanip>
>
> using namespace std;
>
> int
>
> main(int argc, char *argv[])
>
> {
>
> // Get database access parameters from command line
>
> const char* db ="innoviti",*server="localhost",*user="root",*pass="xxxxx";
>
>
>
> // Connect to the sample database.
>
> mysqlpp::Connection conn(false);
>
> if (conn.connect(db, server, user, pass)) {
>
> // Retrieve a subset of the sample stock table set up by resetdb
>
> // and display it.
>
> mysqlpp::Query query = conn.query("SELECT employee_id FROM biometric");  //Slightly
> changed from my previous question
>
> if (mysqlpp::StoreQueryResult res = query.store()) {
>
> cout << "We have:" << endl;
>
> for (size_t i = 0; i < res.num_rows(); ++i) {
>
> cout << '\t' << res[i][0] << endl;
>
> }
>
> }
>
> else {
>
> cerr << "Failed to get item list: " << query.error() << endl;
>
> return 1;
>
> }
>
> return 0;
>
> }
>
> else {
>
> cerr << "DB connection failed: " << conn.error() << endl;
>
> return 1;
>
> }
>
> }
>
> when I executed this code.It is compiled and build succesfully.But at the end it
> gives an error popup and message like this:
>
>
> #.......................................................................................
>
> mysql Cplusplus.exe(My file name) has encountered a problem and needs to close.We are
> sorry for inconvenience.
>
> ...........blah blah blah.....
>
> Please tell Microsoft about this problem
>
> #................................................................................
>
> And whole program stuck.It doesnot give what I expect from program that is the whole
> list of "employee_id"
>
> I had executed the mysql++ source file as well its example succesfully.And i have
> also link the header file of mysql++ and mysql server to the project and also provide the
> full path of library of mysql and mysql++.I have also put the following line to command
> line option of linker 'mysqlpp.lib,mysqlpp_d.lib,libmysql.lib,wsock32.lib.
>
> My system configuration is like this:
>
> Os :Windows XP sp2
>
> visual studio 2008 professional
>
> mysql++ 3.0.6
>
> mysql server 5.0.45
>
>    :::: Please somebody help me out.
>
>
>
>
>



-- 
GamerzWoW - http://www.gamerzwow.net
Thread
program got stuck while executing with mysql++manish15 Sep
  • Re: program got stuck while executing with mysql++Alex15 Sep
  • Re: program got stuck while executing with mysql++Chris Frey15 Sep