> Tech > Listings (2)

Listings (2)

Tech - Par Renaud ROSSET - Publié le 24 juin 2010
email


Listing 6 : Script ActiveX pour la Type1 Refresh DDQ Task

‘ Type 1 Refresh Process
Function Main()
DTSDestination(“package”) = DTSSource(“package”)
DTSDestination(“productname”) = DTSSource(“productname”)
DTSDestination(“productid_app”) = DTSSource(“productid”)
Select Case DTSSource(“tran_type”)
Case “I”
Main = DTSTransformstat_InsertQuery
Case “D”
Main = DTSTransformstat_DeleteQuery
Case “U”
Main = DTSTransformstat_UpdateQuery
End Select
End Function


Listing

7 : Script ActiveX pour la Type2 Refresh DDQ Task

‘ Type 2 Refresh Process
Function Main()
DTSDestination(“package”) = DTSSource(“package”)
DTSDestination(“productname”) = DTSSource(“productname”)
DTSDestination(“productid_app”) = DTSSource(“productid”)
DTSDestination(“effective_date”) = DTSSource(“log_date”)
Select Case DTSSource(“tran_type”)
Case “I”
Main = DTSTransformstat_InsertQuery
Case “D”
Main = DTSTransformstat_DeleteQuery
Case “U”
If DTSSource(“packagechg”) = False Then
DTSDestination(“package”) = -1
Main = DTSTransformstat_UpdateQuery
End Select
End Function

Listing 8 : Script ActiveX pour la procédure stockée usp_Update_Products_type2

CREATE PROC usp_Update_Products_type2
@productid_app AS INT,
@productname AS VARCHAR(25),
@package AS INT,
@effective_date AS DATETIME
AS
IF @package <> -1
BEGIN
UPDATE Products_type2
SET to_date = @effective_date
WHERE productid_key = (SELECT MAX(productid_key)
FROM Products_type2
WHERE productid_app = @productid_app)
INSERT INTO Products_type2(productid_app, productname, package, effective_
date)
VALUES(@productid_app, @productname, @package, @effective_date)
END
ELSE
BEGIN
UPDATE Products_type2
SET productname = @productname
WHERE productid_app = @productid_app
END
GO

Listing 9 : Script de création pour la procédure stockée usp_Update_Products_type3

CREATE PROC usp_Update_Products_type3
@productid_app AS INT,
@productname AS VARCHAR(25),
@package AS INT,
@effective_date AS DATETIME
AS
IF @package <> -1
BEGIN
UPDATE Products_type3
SET productname = @productname,
package2 = package1,
package1 = package,
package = @package,
effective_dat2 = effective_dat1,
effective_dat1 = effective_date,
effective_date = @effective_date
WHERE productid_app = @productid_app
END
ELSE
BEGIN
UPDATE Products_type3
SET productname = @productname
WHERE productid_app = @productid_app
END
GO

Téléchargez cette ressource

Comment lutter contre le Phishing ?

Comment lutter contre le Phishing ?

Dans un environnement cyber en constante mutation, le phishing évolue vers des attaques toujours plus sophistiquées combinant IA, automatisation et industrialisation. Une réalité complexe qui exige des mesures de sécurité avancées et repensées au-delà de l’authentification multifacteur. Découvrez les réponses technologiques préconisées par les experts Eviden et les perspectives associées à leur mise en œuvre.

Tech - Par Renaud ROSSET - Publié le 24 juin 2010