ExecuteSqlQuery issue - InfoPath Dev
in

InfoPath Dev

ExecuteSqlQuery issue

Last post 11-19-2013 02:54 PM by TomRenfro. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-19-2013 12:06 PM

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    ExecuteSqlQuery issue

    Hi, I'm attempting to use the ExecuteSqlQuery command to fire a stored procedure against a SQL table.  I have a column in the table called Entry_Deleted, which is a true/false column as opposed to just deleting the entry.  When the procedure is executed, it changes the value to 1 for true according to the userID.

    I have a receive data connection in the form to the table, and in a button rule, I'm querying the data connection, then running the qRules command.  Here's the command: concat("ExecuteSqlQuery /dsname=DARP /sql=EXEC dbo.MarkAsDeleted @UserID = '", my:UserID, "'")

    I'm not getting any errors from qRules, but nothing's changing in the database.  I'm attempting this when previewing the form, and I do know that it needs to be admin deployed and the data connection changed to a UDC for using in a browser.

    What do you see that might be missing, or does it just not work in preview mode?

    Filed under: ,
  • 11-19-2013 02:41 PM In reply to

     Hi, Tom - the command should work in preview mode. I'm wondering if the issue is your stored procedure. I've found that stored procedures I use in InfoPath via IP data connections need to have implicit transactions set to off - http://msdn.microsoft.com/en-us/library/ms187807.aspx - can you try that?

    Hilary Stoupa

  • 11-19-2013 02:54 PM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    That was it.  You're the best!

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