Forum Replies Created

Viewing 3 posts - 1 through 4 (of 4 total)

  • RE: CREATE TRIGGER with ado.net and C#

    I resolved the prolem:

    I had to send a 'USE [myDatabase]' befor the 'Create Trigger...'

    Solution:

    [font="Courier New"]cmd.CommatText = "USE [myDatabase]";

    cmd.ExecuteNonQuery();

    cmd.CommatText = "CREATE TRIGGER ....";

    cmd.ExecuteNonQuery();[/font]

    ---

    Thanks for your reply!

    cew3

  • RE: variable columns in select statements?

    Hi,

    i tried the folloewing:

    set ANSI_NULLS ON

    set QUOTED_IDENTIFIER ON

    go

    ALTER TRIGGER [InsTrigger] ON [dbo].[emrn]

    FOR INSERT

    AS

    BEGIN

    SET NOCOUNT ON

    DECLARE @tbname varchar(100)

    DECLARE @fieldname varchar(50)

    DECLARE @id varchar(100)

    DECLARE @s-2 varchar(2000)

    select @tbname = 'emrn'

    DECLARE triggeredfields CURSOR

    FOR

    SELECT...

  • RE: variable columns in select statements?

    Hi Pierre,

    at the moment I'm tesing the complete functionality just in the trigger.

    But this is not the main problem.

    I fetched the identity from 'inserted' and could fetch now the complete...

Viewing 3 posts - 1 through 4 (of 4 total)