Hi guys,
In order to do my stuff, I query the database (Access) to see if my data is already there. So, I'm using a OleDbDataReader. Everything is fine at this moment.
Next, depending on the result of my query, I'm doing an insert or and update. The problem is, this operation is using the same parameters (OleDbParameters) that I was using for my first query.
So when I'm trying to add these parameters to the command, I'm getting this error :
The OleDbParameter is already contained by another OleDbParameterCollection
I tried everything to clear those parameters : - Close on the OleDbDataReader - Dispose on the OleDbDataReader - myOleDbDataReader = null
But nothing seems to work.
Anyone has any idea ?
Thanks a lot.