ExecuteSQLQuery Successful but nothing happens in DB - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

ExecuteSQLQuery Successful but nothing happens in DB

Last post 01-18-2016 12:36 PM by Mfranco. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 01-18-2016 11:20 AM

    ExecuteSQLQuery Successful but nothing happens in DB

    concat("ExecuteSqlQuery /dsname=Main connection /sql=UPDATE test_table SET goal_pct = '", goal_pct, "' WHERE emp_code = '", emp_code, "'") Above is my command I'm executing when the user clicks the button. Though everything in InfoPath says its "successful", nothing actually is updated. As stated I'm not getting any errors. The Main connection is a simple SELECT emp_code, goal_pct FROM test_table. Submit enabled. Filler form 2010, Full trust with a Cert from the CA. Any ideas on why it's not updating the record?
  • 01-18-2016 11:36 AM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    I'm not sure offhand if this was tested with a main db connection with submit enabled - can you try with a secondary SQL DB Connection? You may also want to run a trace on your server so you can see what's happening there.
    Hilary Stoupa

  • 01-18-2016 11:45 AM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    I did attempt a secondary connection. I set it up to receive though and got the same results. Do I need to set it up to submit instead?
  • 01-18-2016 11:50 AM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    Nope, should be a receive connection... are you able to run a SQL trace and see what is happening?
    Hilary Stoupa

  • 01-18-2016 11:59 AM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    Unfortunately that's proving difficult. Client hasn't given me access. :( Any other way of perhaps finding out what's happening behind the curtain? I know I can run a packet capture, but I'm not sure I'd get the response I'm actually looking for.
  • 01-18-2016 12:08 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    Blech. :) Okay - not sure what version of qRules you are running - if you check the QdabraRules data source, is there a group called ExecutionHistory? If so, can you drag that onto your form and test the command so you can see the actual command being used? I know with stored procedures and InfoPath we have (or at least at one time had to) set implicit_transactions off - maybe start your update statement with that? Worth a try....
    Hilary Stoupa

  • 01-18-2016 12:12 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    7.2 is my current version. I have the group Exec Hist on my form. Tells me everything is successful. (Successful checkbox checked) No errors. I'll try the implicit transactions command. Do I need to turn it back on after? Or is it only for the one transaction that it's off?
  • 01-18-2016 12:22 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    I should have been more clear. I'd like to see the command text from the execution history, after the concat statement has been applied. :)

    Per MSDN, implicit_transactions is per connection:  https://msdn.microsoft.com/en-us/library/ms187807.aspx

    Hilary Stoupa

  • 01-18-2016 12:25 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    That did the trick my dear! Once again you're a life saver. Hope you're having a good start to the new year.
  • 01-18-2016 12:28 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    Hey, that is awesome news, now we both learned something new today. :)
    Hilary Stoupa

  • 01-18-2016 12:36 PM In reply to

    Re: ExecuteSQLQuery Successful but nothing happens in DB

    Works with the Main connection as well. And if you still want the command, just out of curiosity, Let me know. I think I still have your email.
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.