SQL Server 2000 Trigger doesn't work - InfoPath Dev
in

InfoPath Dev

SQL Server 2000 Trigger doesn't work

Last post 09-11-2009 09:51 AM by apc3usa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-14-2008 11:37 AM

    • cduwel
    • Not Ranked
    • Joined on 08-14-2008
    • Posts 4

    SQL Server 2000 Trigger doesn't work

    I am appending records to an SQL Server 2000 database using InfoPath 2007.  I made a trigger on the table the form is based on but when I append a new record the trigger never fires.  The trigger works fine if I append a new record using Query Analyzer.

    I first assumed it just would not work due to some limitation of InfoPath but I've found references to people using trigger (successfully) but no help on why one would not work at all.  There is no error message and the data is appended to the table but the trigger seems to be asleep.

     Any ideas please.

    Thanks

     

     

    8/15

    An update - The trigger actually worked once.  I had given up and I was going to try to find a way to do what I needed with out using a trigger.  When I first tried the new form and submitted it the trigger worked and did what it was supposed to do.  I then removed some of the fields from the from the form and tried again and the trigger went back on strike.  I put the fields back and it still won't work.  It did once so that's a little better - But why???

     

  • 08-17-2008 08:03 AM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    Does it matter if all of the fields are completed?

    Does InfoPath only submit a partial record or leave some blank? I would try some testing with that.

  • 08-21-2008 03:10 AM In reply to

    • cduwel
    • Not Ranked
    • Joined on 08-14-2008
    • Posts 4

    Re: SQL Server 2000 Trigger doesn't work

     As far as I can tell it does a complete insert of all the fields I ask it to.  Some are null but I left them that way.  I have tried it different ways and the one time it did work I think I did fill in all fields, but I haven't been able to get it to work again all fields or no.

    Thanks

     

  • 08-20-2009 12:59 PM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    I am running into the same kind of problem.  i am running InfoPath 2007 and SQL 2008, my trigger works within SQL, but once i open the form and write to the table, the form says it submits correctly, but when i look up the SQL Table, nothing has been inserted???  any suggestions would be greatly appreciated.  -Patrick

  • 08-23-2009 11:52 PM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    Hi, I am using the triger and it all works fine. It fires on the "UPDATE/INSERT" event...

    Do you have some master - detail tables? There could also be problem with primary key (a don't see any problems if you use identity option in the sql table - otherwise you have to somehowe provide primary key... 

    - Marko

  • 09-11-2009 09:15 AM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    Patrick,

     Did you ever get this figured out?

     John

  • 09-11-2009 09:22 AM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    yes, i did get it figured out... it had to do with my automating of the email after the trigger.  i had to change the permissions of who was sending out the email to match the person who is writing the infopath form.

  • 09-11-2009 09:42 AM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    Great. I am new to using triggers. Do you have to use one when trying to update a record in SQL Server from an InfoPath form? I am able to insert a record but when I try modify the record it states that their is already a record with that primary key.

  • 09-11-2009 09:51 AM In reply to

    Re: SQL Server 2000 Trigger doesn't work

    no, you do not need a trigger to update a record.  infopath should update the record automatically...  i use the trigger to create a log, and start procedures...

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.