C++ MYSQL "std::logic_error" första testklassen

Permalänk
Medlem

C++ MYSQL "std::logic_error" första testklassen

Hej!

Jag har efter att studerat MYSQL <--> C++ APIt försökt att göra mig ett litet bibliotek utav det.
Det går bra att ansluta och att utföra mysql_query, men utefter det så kan jag inte använda resultatet då jag får följande output:
kira@abra:~/MYSQL$ ./mysqlconnect
KiraMYSQL : Connection sucsessful
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Avbruten (SIGABRT)

Någon vänlig själ som vill peka ut vad jag gjort fel?
Min testfil
Min MYSQL CPP bibleoteksfil
Min MYSQL H bibleoteksfil

Visa signatur

[i]Those who don't understand UNIX are condemned to reinvent it, poorly. – Henry Spencer [/i]
[i]“Programmers are in a race with the Universe to create bigger and better idiot-proof programs,
while the Universe is trying to create bigger and better idiots.
So far the Universe is winning.”
[/i]

Permalänk
Medlem
Citat:

MYSQL_ROW

This is a type-safe representation of one row of data. It is currently implemented as an array of counted byte strings. (You cannot treat these as null-terminated strings if field values may contain binary data, because such values may contain null bytes internally.) Rows are obtained by calling mysql_fetch_row().

Saxat från mySQL api beskrivningen http://dev.mysql.com/doc/refman/5.0/en/c-api-data-structures....
Det med fett stil är det viktiga. då det låter som du får något NULL fel på en initiering av en string.

Visa signatur

orka