"Note that the callback function reports a NULL value in the database as a NULL pointer, which is very different from an empty string. If the i-th parameter is an empty string, we will get: argv[i][0] == 0 But if the i-th parameter is NULL we will get: argv[i] == 0"So maybe there are different pointers here which You should test ?Best RegardsBoguslaw