Bizarre Behaviour | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Bizarre Behaviour

Hi folks, I’ve worked with various SQL DBs for years in a bit lighter capacity than a full-fledged DBA, but not by much. I happen to be baffled by this however, and please pardon the simplicity of the question. Basically, I just want to know if anyone has come across a similar issue and how it was resolved. The pieces to the puzzle are simple: ASP ->
ADODB Connection Object Execute ->
MSSQL 7.0 Table Insert (via a stored procedure with return select) =
Double Insertion! If I can *guarantee* that the stored procedure is not being executed twice by ASP/ADO, give my word that I’ve created no triggers to re-execute the procedure, and ensure that it is happening by SQL’s hand itself, can anyone enlighten me as to what could possibly be happening? The ASP code and such is a bit involved as it is an integrated framework, but I’m happy to supply a DB trace if necessary. The trace does show it is being executed twice (as the resulting inserted data does as well of course), and the procedure itself is little more than something like this: SET NOCOUNT ON INSERT mytable (this, that, other) VALUES (@this, @that, @other) SELECT something AS something SET NOCOUNT OFF Thanks a LOT in advance,

What happened when you are trying to exec the stored procedure from QA?
Are the lines inserted identical? Is it possible there’s a form that is submitted twice?
Try to print the string that the ASP code is generating, and run it from QA to see what happenes. Bambola.
As a first point of assessment try capturing trace from PROFILER and see where it lacks. _________
Satya SKJ

Are you using ASP.NET? I’ve found that if the AutoEventWireup property of the Page directive is set to true then the codebehind for the page is executed twice in the development enviroment and should always be set to false. Cheers
Shaun World Domination Through Superior Software