Cum fixezi "Account Aleardy Connected" bug?
Simplu... ruleaza urmatoarele 2 Scripturi in SQL Query analyzer.
Cod:
CREATE PROCEDURE WZ_CONNECT_MEMB
@uid varchar(10),
@server varchar(15),
@uip varchar(15)
AS
Begin
BEGIN TRANSACTION
SET NOCOUNT ON
si acest Script
Cod:
CREATE PROCEDURE WZ_DISCONNECT_MEMB
@uid varchar(10)
AS
Begin
BEGIN TRANSACTION
SET NOCOUNT ON
IF EXISTS ( SELECT memb___id FROM MEMB_STAT WITH (READUNCOMMITTED)
WHERE memb___id = @uid )
Begin
UPDATE MEMB_STAT
SET DisConnectTM = (getdate()), connectstat = '0' WHERE memb___id = @uid
End
ELSE
Begin
INSERT INTO MEMB_STAT ( memb___id,ConnectStat,DisConnectTM) values (
@uid,
0,
(getdate())
)
End
IF(@@Error <> 0 )
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
SET NOCOUNT OFF
End
GO