logo       

mysql++ (VC-Version): crash when trying to a query.store();: msg#00043

db.mysql.c++

Subject: mysql++ (VC-Version): crash when trying to a query.store();

Hi people,

I'm trying to write a little mysql-app with mysql++. Connecting to the database is no problem, but doing a query to it.. the app simply crashes.

Here's the ouput of my app, after it I post a small part of the app's source:

initializing Version: 0.0.1 [COLONY]...
[-] using database type: MySQL
[-] using database host: 192.168.0.1
[-] using database port: 666 //ignore this... the app doesn't use it
[-] using database name: ugs_db
[-] using database user: sql
[-] using database password: primax
[-] connected to database ...
[-] database host information: 192.168.0.1 via TCP/IP
[-] database client information: 3.23.32
[-] query preview: select * from ugs_system

snippet of the code:
TiXmlDocument* cDBLMySQL::read(std::string sSQLCommand)
{
Query query = _pDBConnection.query();
Result res;

if(!_pDBConnection.connected())
{
Logger::write(LLEVEL_PANIC,"[-] not connected to database
...\n");
return NULL;
}

try
{
query << sSQLCommand.c_str();
Logger::write(LLEVEL_DEBUG,"[-] query preview: %s\n",query.preview().c_str());

//my app crashes within this method.. I don't know why....
res = query.store();
return buildXML(res);
}
catch(BadQuery er)
{
Logger::write(LLEVEL_PANIC,"[!] %s \n",er.error.c_str());
return NULL;
}

return NULL;
}

If anyone got a similar experience and got an answer to this question, it would be great if (s)he could help me out.

Thanx in advance,
--
Alexander Bierbrauer

Geschäftsführer, Software Architect

polyfrag
Lilienstr.1
66773 Schwalbach

Tel.: +(0) 49 06834 567815
Fax.: +(0) 49 06834 568460
Mobil: 0163 4208968
Web: http://www.polyfrag.com
eMail: alex@xxxxxxxxxxxx






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise