Hallo NG,
I have a problem which will confuse me
Plattform: NT-Server 4.0, SQL 6.5 SP5a
I have a table called tblStammdatenProperties
I will fire a stored proc to enter values into this table (as shown below)
When I remove the RETURN between the two statements the sp hangs (Profiler will show no actions)
The proble here is a very very compley trigger (i will not post it because its more than 500 lines!)
This trigger will change values in the same table (tblStammdatenProperties)
When i use only the first INSERT/UPDATE-Statement the proc will run perfect
As soon i remove the RETURN (to start 2 insert/updates) the stored proc hangs and will block the whole server
Any ideas, what i can do?
Thank you in advance
Uwe Ricken
GNS GmbH, Frankfurt am Main
/* Entering DuesBase in die Daten */
BEGIN TRANSACTION
IF EXISTS (
SELECT * FROM dbo.tblStammdatenProperties
)
UPDATE dbo.tblStammdatenProperties
ELSE
INSERT INTO dbo.tblStammdatenProperties
(ST_ID, PropId, PropValue)
VALUES
COMMIT TRANSACTION
RETURN -- !!! This will cause the problem
/* When entered DuesBase now we can enter DuesAmount*/
BEGIN TRANSACTION
IF EXISTS (
SELECT * FROM dbo.tblStammdatenProperties
)
UPDATE sp3
SET PropValue = MbsDues
FROM
tblStammdatenProperties sp1 INNER JOIN tblStammdatenProperties sp2
INNER JOIN dbo.tblStammdatenProperties sp3
ON (sp1.PropValue = md.MbsCode AND sp2.PropValue = md.MbsDuesBase)
WHERE
ELSE
INSERT INTO dbo.tblStammdatenProperties
(ST_ID, PropId, PropValue)
SELECT
md.MbsDues
FROM
tblStammdatenProperties sp1 INNER JOIN tblStammdatenProperties sp2
ON (sp1.PropValue = md.MbsCode AND sp2.PropValue = md.MbsDuesBase)
WHERE
COMMIT TRANSACTION
--
Gru?, Uwe Ricken
MCP FOR MS ACCESS DEVELOPMENT
exklusiver Ausbilder der "Ausbilder und Berufschullehrer des Landes Hessen"
fr Datenbankentwicklung
GNS GmbH, Frankfurt am Main
http://www.gns-online.de
____________________________________________________
APP: http://www.AccessProfiPool.com
FAQ: http://www.donkarl.com/AccessFAQ.htm
____________________________________________________