Updating tables / trigger - InfoPath Dev
in

InfoPath Dev

Updating tables / trigger

Last post 05-02-2007 08:43 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-27-2007 02:50 AM

    • Jibi
    • Top 500 Contributor
    • Joined on 12-07-2006
    • Posts 28

    Updating tables / trigger

    Hi

    I've a form including an extensible section wich includes a extensible array.
    Section = Global Costs of project
    Array = details by year

    My form is based on 2 SQL tables (global and détails) which are linked

    I create a trigger udpating a third table depending value of one field of the global table

    ***********************
    CREATE TRIGGER [InsertSatcli] ON [dbo].[CoutsINF]
    AFTER INSERT
    AS
    Declare @choix bit, @id int,@NumWic nvarchar (50),@rap int,@domRap int,@com nvarchar(300),@idcouts int,@CpInfo nvarchar(50)
    select @id = (select idlotprojet from Inserted)
    select @idcouts=(select IdCoutsINF from Inserted)
    select @choix = (select ValPvDef from Inserted)
    select @NumWIc=(select NumWic from inserted)
    select @com=(select comments from inserted)
    select @CpInfo=(select NomCpEds from inserted)
    select @rap=(select distinct coderap from projet,lotprojet where projet.codeprj=lotprojet.codeprj and lotprojet.idlotprojet=@id)
    select @domRap=(select distinct CodeDomaineRAP from projet,lotprojet where projet.codeprj=lotprojet.codeprj and lotprojet.idlotprojet=@id)

    If @choix = 1
    Begin
    insert into SatcliPrj (IdCoutsINF,NumWic,CodeRap,ValidSaisie,CodeDomaineRap,comments,CPInfo)
    values (@idcouts ,@NumWic,@rap,0,@domRap,@com,@CPInfo)

    End
    *****************
    Pb :
    When the trigger is not executed, global and details tables are correctly updated

    When the trigger is executed, my third table is correctly updated but not the table of details by year.
    I've no error msg
    it seems not continuing updating after excuting the trigger

    Thanks for help and sorry for my english
  • 05-02-2007 08:43 AM In reply to

    Re: Updating tables / trigger

    Hi,

    I think you will need to provide a little more information on your schema, both on the InfoPath and Database ends. If you are having trouble with how your database trigger is behaving I would reccommend hooking up the SQL Server Profiler so that you can watch what exactly is happening and when. This will also allow you to see any error messages that might be getting buried.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.