I am using DAL code generated using the adapter templates, targeting an Oracle 10g database. In one particular bit of code I am fetching a set of records into an entity collection, then looping through, changing a field, and executing an update of each entity. When I create the DataAccessAdapter I use the overload specifying that the connection should remain open:
using(DataAccessAdapter adapter = new DataAccessAdapter(true))
{
// execute adapter.FetchCollection()
foreach(entity in collection)
{
// change entity field
//execute adapter.SaveEntity()
}
}
The initial fetch into the collection runs fine, and is very fast. The second query action, the update of each entity, times out every time. I set the command timeout to 180 and it still times out. If I execute the generated update query in TOAD it executes within a few milliseconds (using same db connection info). I am obviously quite confused by this behavior, as it is clearly not an issue of a terribly-constructed query--in fact the update query is an update of a single NUMBER(1) field and using the PK in the filter clause. Yet every time I get the "ORA-01013: User requested cancel of current operation" error message.
Any ideas as to why this might be occurring?
Thanks,
Larkin