Hi,
Quote:
This is a sample of my code:
int key_data_length= sizeof(int); // I think this line is sufficient.
while ( get(&key, key_data_length, DB_NEXT_NODUP) ) |
If this "get" is a function you have implemented that calls DB, there
is no way that it could be modifying key_data_length, since you are
passing by value.
If this is shorthand for a call to this cursor method:
dbc->c_get(dbc, &key, key_data_length, DB_NEXT_NODUP)
then I'm surprised that it compiles. Aren't there warnings?
The third parameter in this call (where you are passing key_data_lenth)
should be a pointer to a DBT that will hold the data value part of the
key/data pair.
If I've misunderstood, can you please post the code that actually makes
the call to Berkeley DB?
Regards,
Michael.