|Subject||Re: [firebird-support] Re: Is there still a difference between sweep and gabage collection?|
On Feb 23, 2015, at 1:06 AM, SUKHEN DASS sukhendass@... [firebird-support] <email@example.com> wrote:
I am using vb.net which has a grid of 100,000 records and 30 columns have to insert in a firebird table.
First, you've hijacked a thread, which is not considered polite on this very traditional email list.
The insertion will take place if product id does not exist else record to be update.
Right - and I'm assuming you've got more than one thread working at a time.
But inside the loop while executing ExecuteNonQuery control does not come back wait for 10 hours still not came and no error message and it happens on random rows not always for the same recrod
OK. What's happening is that one thread has updated the record and gone off to do something else or gone to sleep. It's really important that you commit your transaction after updating a record unless there's more than one record that must be updated to make the database logically consistent.
I am struck past 7 days i am working googled but no solution Finally i decided to firebird support team
You've come to the right place. What you should do is commit after each record insert/update and probably choose the "no wait" transaction option. What's happening is that one thread is updating record A without committing the update then another thread is trying update the same record. Because there's an uncommitted update, the second update waits, hoping the first will fail and it can succeed. But its hopes are in vain. The first thread continues on its merry way, ignoring the trail of uncommitted changes it leaves in its path and the other threads, waiting for it to end.
My project is getting delayed please, help
Read some more about transaction semantics, or just get in the habit of commiting after each set of changes that leave the database consistent.