Click to See Complete Forum and Search --> : Easy OLEDB AddNew question for Vis C++


softyengin
March 26th, 2003, 10:15 AM
Hi I have the following code


dbMessageQueue.AddNew();
dbMessageQueue.SetTextMessage("txt");
dbMessageQueue.SetMessageStatus(1);
dbMessageQueue.SetMessageSize(1);
dbMessageQueue.Update();


Im accessing the record set via "_RecordsetPtr"
Now my problem is the fields i have are all "not nulls"

From the docs it says do an AddNew, set your fields (which is the functions above) then call Update to actually send the data to the database.

Now the weird thing I have found is that when i set my member field data ie SetTextMessage("sms") i get the error

cannot update the database because not all fields have been filled in.
but it shouldnt be commiting the data till the Update?

Anybody know whats going on?

ta

M Owen
March 26th, 2003, 10:26 AM
That depends on how you're opening the recordset ... And by the way what database are you doing this in? That too might influence this behaviour ...

softyengin
March 26th, 2003, 10:41 AM
aghh got it, somebody elses code ws submitting it before i had finished updating it!!

communication eh!!