J
jsa1981
I have created a database model and generated the SQL for this. My
problem is that half of this SQL has triggers at the end that I do not
want - e.g. (see below). How do I tell Visio not to create any of these
triggers?
I know I can delete them from the SQL, but there must be a reason why
they are there.
Thank you
Jagdip Singh Ajimal
================================================================
Create Trigger T_Regiondelete on T_Region
for delete
as
/* Visio Enterprise generated trigger code. */
BEGIN
declare
@errorNumber int,
@errorMsg varchar(255)
/* trigger for ON DELETE to PARENT NO ACTION (RESTRICT) */
if exists(
select * from deleted, T_Sites where T_Sites.I_RegionID =
deleted.I_RegionID)
begin
select @errorNumber = 30004,
@errorMsg = 'Cannot delete from T_Region because T_Sites
exists.'
goto errorHandler
end
return
errorHandler:
raiserror @errorNumber @errorMsg
rollback transaction
END
==========================================================
problem is that half of this SQL has triggers at the end that I do not
want - e.g. (see below). How do I tell Visio not to create any of these
triggers?
I know I can delete them from the SQL, but there must be a reason why
they are there.
Thank you
Jagdip Singh Ajimal
================================================================
Create Trigger T_Regiondelete on T_Region
for delete
as
/* Visio Enterprise generated trigger code. */
BEGIN
declare
@errorNumber int,
@errorMsg varchar(255)
/* trigger for ON DELETE to PARENT NO ACTION (RESTRICT) */
if exists(
select * from deleted, T_Sites where T_Sites.I_RegionID =
deleted.I_RegionID)
begin
select @errorNumber = 30004,
@errorMsg = 'Cannot delete from T_Region because T_Sites
exists.'
goto errorHandler
end
return
errorHandler:
raiserror @errorNumber @errorMsg
rollback transaction
END
==========================================================