Board index » delphi » MSSQL Stored Proc a strange problem
Marek
![]() Delphi Developer |
Tue, 26 Jul 2005 00:07:28 GMT
MSSQL Stored Proc a strange problem
Hi there, I have very strange problem with MSSQL 2k stored procedure.
The stored procedure takes 3 parameters, the body has two parts: record deletion and record insertion. The deletion attempt is being made every time, no matter if the table is empty or not. Then the insertion happens. The problem is that when I call it 2 times inside a transaction, I am not getting 2 records in the table. Here the pseudo-code that represents what I am doing - I execute it from my application using ADO 2.5 and Delphi5: MyConnection.BeginTrans; myStoredProc( 1, 100, 1000 ) myStoredProc( 2, 200, 2000 ) MyConnection.EndTrans; I do not understand why, but after executing this code I [usually] have only CREATE PROCEDURE dbo.spModuleChange @ID smallint, @Module integer, @Key When I modify the stored procedure that it executes 'delete' part only if Thank you very much, |