G
Guest
Hi,
I am adding a record to the database using an ExecuteNonQuery, which adds
without problem. Now after the record is added I run a method passing in
some info as well as the curretnly opened connection (byRef cn as
OleDbConnection). Am using an Access 2000 database. Now in this new method I
create a command object using the passed in connection object. I then create
a DataReader to read the database that has the record added in the
ExecuteNonQuery section. Now if I step through my program everything works,
but if I let it run the dataReader doesn't see the newly created record!! If
I add a for loop (1000 steps, sometimes longer) the DataReader see the
record. So I can I be sure that the record added is actually in the database
before the dataReader attempts to read the database? By the way the
RecordsAffected in the ExecuteNonQuery does show 1.
Any ideas?
Thanks
John
I am adding a record to the database using an ExecuteNonQuery, which adds
without problem. Now after the record is added I run a method passing in
some info as well as the curretnly opened connection (byRef cn as
OleDbConnection). Am using an Access 2000 database. Now in this new method I
create a command object using the passed in connection object. I then create
a DataReader to read the database that has the record added in the
ExecuteNonQuery section. Now if I step through my program everything works,
but if I let it run the dataReader doesn't see the newly created record!! If
I add a for loop (1000 steps, sometimes longer) the DataReader see the
record. So I can I be sure that the record added is actually in the database
before the dataReader attempts to read the database? By the way the
RecordsAffected in the ExecuteNonQuery does show 1.
Any ideas?
Thanks
John