"Simon Hayes" <sq*@hayes.ch> wrote in message news:<3f********@news.bluewin.ch>...
"george" <ge*****@crystalgraphics.com> wrote in message
news:62**************************@posting.google.c om... This is like the bug from hell. It is kind of hard to explain, so
please bear with me.
<snip>
I have no idea what's causing the issue, but the usual advice is to use
Profiler to trace the SQL which is getting sent to the database. You may see
something in the statements which helps you pin down what's going on.
Another thing to check is if there is an INSERT trigger on the table.
Simon
Thanks for your help. I found the cause. This is a web page that
contained a form. The form had a button with an onClick event handler
that evolked a script that submitted the form. Well, I added another
form to the page, and wanted the form to be submitted when the user
pushed the 'enter' key, so I focused the new submit button, and put an
onSubmit event handler in the new form. But the onSubmit event handler
evolked the before-mentioned script, so apparently two forms were
being submitted. One form had a hidden form element that contained
the previous 'search string' and the other form had an input box for
the current 'search string'. It explains why 2 db inserts happened
when I submitted the form, but it does not explain why sometimes 3
inserts happened. Anyway, it was kind of difficult to debug, because
it was not evident that 2 forms were being submitted, because, to the
user, the page worked just fine.
Well, perhaps this incident will help someone else down the road who
may run into this situation.
George