Transaction error when submitting to database - InfoPath Dev
in

InfoPath Dev

Transaction error when submitting to database

Last post 09-20-2005 11:41 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-19-2005 12:15 AM

    Transaction error when submitting to database

    Hi,

    I get the following error when submitting the contents of a form to a database (update):

    "The query method on the Document object failed.
    InfoPath cannot run the specified query.
    Connection object cannot be explicitly closed while in a transaction."

    I have rebuilt the data connections in the form, restarted the SQL server, and created a second copy of the form. All to no avail. Can anyone help?

    I am not sure what details are relevant here. The error occurs when Infopath runs the "submit to a data connection (database)" action. The data can be submitted to sharepoint, just not a database. This worked fine in the past, although I have made a few changes. I am unable to tell which changes may have caused this to happen.

    -- Jay Whittaker --
  • 09-19-2005 10:53 PM In reply to

    Re: Transaction error when submitting to database

    Hi Jay,
    Have you written code to do the submit to the database or are you just using the codeless wizard to set it up? What changes have you made? My guess is the changes are causing the problem.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 09-19-2005 11:37 PM In reply to

    Re: Transaction error when submitting to database

    I am using a custom button with rules. The rules allow me to use one button to submit to different sources. I have not written the code myself, just used inbuilt rules (submit data by database connection). The changes I made were small, I changed the binding of a field in the form. Changing it from a number to text. I have done similar stuff many times before.

    -- Jay Whittaker --
  • 09-19-2005 11:58 PM In reply to

    Re: Transaction error when submitting to database

    *****Just noticed somethig that may point to a problem***** or might be an additional problem?

    The database from where the data is populated and is written is now a mess. Infopath has stopped updating the existing records and started to add new records and linked fields each time I submit a form. For example: I opened an existing form, then clicked submit. Rather than updating the existing form data, Infopath created new rows in the database. Therefore duplicate rows existed. This means that linked tables are compromised and unexpected data is shown in the forms.

    -- Jay Whittaker --
  • 09-20-2005 05:20 PM In reply to

    Re: Transaction error when submitting to database

    I had a second copy of the template where i was testing fixes for this. I suspect that this may have been causing the issue described above (duplicated entries). I have also reverted back to on old archived copy of the template - rebuilt the data connections and the error disappeared. I am not comfortable with this as I still don't know what caused the issue. I would like to avoid this happening in the future.

    -- Jay Whittaker --
  • 09-20-2005 11:41 PM In reply to

    Re: Transaction error when submitting to database

    Hi Jay,
    Thanks for the blow-by-blow account of what happened. Without looking at the form, I have no idea what might have caused this. Sorry, but my ESP crystals aren't vibrating tonight. Maybe I'll switch to cards and try a hand of Tarot... :) Seriously, I'm glad you are back in action. Try diffing the xsns by extracting the form contents (File->Extract Forms) and comparing with a tool like windiff. Cheers!



    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.