How do I fetch data ?

  • Thread starter Thread starter Sébastien
  • Start date Start date
S

Sébastien

After an insert in my database using a OleDbDataAdapter, how can I fetch
data ?

I need to fecth data because when I don't have any data in one of my table
and I add a new row in my Table, then I update it, it give me a concurrency
exception. It don't give me any exception if I had a record before I fill my
DataSet.

Thank you for your help
 
Hello Sebastien:
Sébastien said:
After an insert in my database using a OleDbDataAdapter, how can I fetch
data ?

I need to fecth data because when I don't have any data in one of my table
and I add a new row in my Table, then I update it, it give me a concurrency
exception. It don't give me any exception if I had a record before I fill my
DataSet.

Thank you for your help
When you say Fetch Data, do you mean as in a Cursor or simply performing a
SELECT Statement? Simply adding a new record to an empty table in and of
itself shouldn't throw a concurrency exception. What does your Update
Statement look like and your insert statement look like. Are you using a
CommandBuilder, DataAdapter Config wizard or did you write your own logic.
If you call Dim dt as DataTable = dataSet.GetChanges before the update, what
does it show you? If you are getting a concurrnecy exception, the
DataAdapter /CB etc thinks that something has changed in the database since
you first pulled over your query. Could be a lot of things causing it so
it'd help if you posted your code.

HTH,

bill
 
Back
Top