I have write a program using mysql++ C API with VC6 that try to connect to a mysql db server @ localhost. The program is as follow:

/******************* program start *****************/
#include <iostream>

#include <stdlib.h>
#include <time.h>
#include <list>

using namespace std;

int main(int argc, char** argv){
Connection m_con;
m_con.connect(argv[1], argv[2], argv[3], argv[4]);

cerr << "Current Connection Statue - ";
cerr << "success" << endl;

Query query(&m_con);
query << "SELECT count(*) FROM ACCOUNT_TABLE";
Result res = query.store(); // PROGRAM CRASH AT THIS STATEMENT

} catch (BadQuery er) {
cerr << "ERROR 1" << endl;
} catch (BadConversion er) { // handle bad conversions
cerr << "ERROR 2" << endl;
else cerr << "fail" << endl;


/************************ Program End ****************/

The program work without any problem on WinNT as well as Win98.

However, the program does CRASH on Win2000, at the statement query.store(). Reason of crash is :

the instruction "0x77fcb032" reference to the memory "0x00000000", that cannot be "written"

I know that this error mean the instruction in the "query.store()" try to reference to a NULL pointer.

I have tried to recompile my program in my windows2000 computer, the program also crash with the same reason.

I have tried to test the program in other windows2000 computers, they also crash.

I have tried to test the program on WinNT and Win98, it work prefectly without any problem.

Is there any people experienced this problem too ?
Is the mysql++ C API have bug that doesn't work on the win2000 but work on other window system ?

Is there any people can share his/her experience to solve this problem to me please ?

Thanks !