Our community of experts have been thoroughly vetted for their expertise and industry experience. Experts with Gold status have received one of our highest-level Expert Awards, which recognize experts for their valuable contributions.

maybe you got a timeout specified in the connection you use.
I think default value is something like 10 or 15 (s). And if the operation takes longer, as in your sample because of missing PK, than the timeout
happens.
Try finding out what is the value for "timeout" in the connection u are using and increase it or set it to 0. 0 means, that the connection will stay open as long as the operation takes.

When you insert a value from the EM, these two things will happen
1. An 'INSERT INTO ... ' statement is run first -- This wont give the timeout error
2. After the above statement, it will run a 'SELECT * FROM urTable' -- I think the problem is here
Since it has to return more than 700000, sometimes it may give an error

Not the solution you were looking for? Getting a personalized solution is easy.