problems receiving data from stored procedure - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

problems receiving data from stored procedure

Last post 11-21-2022 09:09 AM by Hilary Stoupa. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 11-11-2022 07:26 AM

    problems receiving data from stored procedure

    I'm having problems with a form handed down to me. we recently went through some changes with the stored procedure and it now requires an additional parameter. we've been using the modifysqlquery command in qrules to achieve this, however after altering the procedure and adding the additional parameter, the query returns nothing. no errors or connection problems or anything. I've used wireshark to determine that the data is in fact being sent to and loaded from the server, but it isn't populating in the form. Is there something I'm missing other than changing the parameters?
  • 11-11-2022 07:44 AM In reply to

    Re: problems receiving data from stored procedure

    First, your tag game is on point. Second - I wonder if the data returned from the stored procedure changed at all? Perhaps the data connection fields don't align with what is currently being returned from the stored procedure? You can use the qRules command: GetXml /dsname=YourDataSourceName to get back the actual XML in the data connection and compare that to the schema for the data connection - see if there are differences.
    Hilary Stoupa

  • 11-11-2022 09:12 AM In reply to

    Re: problems receiving data from stored procedure

    we tried recreating the connection from scratch in a new form with the same results.
  • 11-11-2022 10:07 AM In reply to

    Re: problems receiving data from stored procedure

    If you use GetXml /dsname=YourDataSourceName in the qRules command field, XML should be returned in the Result field - that would be at least a start to figuring out what's up.... is the XML returned what you expect?
    Hilary Stoupa

  • 11-18-2022 06:44 AM In reply to

    Re: problems receiving data from stored procedure

    I keep getting an error: "GetXml/dsname" does not point to a valid location path of a field or group. is there something wrong with my syntax? GetXml /dsname = approvers
  • 11-18-2022 07:37 AM In reply to

    Re: problems receiving data from stored procedure

    Sounds like you may be trying to put that text in a formula editor. Put the qRules command and result field on the form so you can just enter the text as you have it into the command field and tab out: GetXml /dsname=approvers
    Hilary Stoupa

  • 11-18-2022 08:39 AM In reply to

    Re: problems receiving data from stored procedure

    Ah I see now. I entered the command in the proper way I think, however there is nothing populated in the error or results field and the success marker is checked. same is true in execution history. Any advice?
  • 11-18-2022 09:16 AM In reply to

    Re: problems receiving data from stored procedure

    So - to me, this indicates no data has been returned in that data source. You can check this by checking a different data connection - do you have other data connections in your form? You can also just use GetXml and it will return the main data source XML to the results field so you can see how the command works.... But I guess the next thing I'd verify is that your approvals data connection has been queried. Please feel free to attach a copy of your form under the Options tab if you'd like me to take a quick look. I can't connect to your data sources, of course, but could give it a quick check for logical errors.
    Hilary Stoupa

  • 11-18-2022 10:28 AM In reply to

    Re: problems receiving data from stored procedure

    There are quite a few data connections and they are all working as expected. Thank you for all your help!
  • 11-18-2022 10:50 AM In reply to

    Re: problems receiving data from stored procedure

    Can you put the QdabraRules execution history on your form and verify that the Modify SQL Query command for the approvers data connection is returning success? The command is supposed to execute the query, but if GetXml /dsname=approvers isn't returning any data, that would indicate there is no data being returned to the form... I also noted something a bit odd about this data connection in the form's manifest file. It had a xsf2:adoAdapterExtension element that appeared malformed. Not sure what happened there, but the other data connections don't have that element, so I thought I'd try removing it in this copy. You could also check and see if this copy behaves better. Right click the link in the header and save as to save locally, right click the saved file and select Design to open in design mode.
    Hilary Stoupa

  • 11-18-2022 10:58 AM In reply to

    Re: problems receiving data from stored procedure

    the modifysqlquery command was succeding before. now It returns the following error: ModifySqlQuery error: InfoPath has encountered an error. The operation failed.  The form's code contains an error. The following call in the form's code failed: ADOAdapter.Query Operation aborted
  • 11-18-2022 11:09 AM In reply to

    Re: problems receiving data from stored procedure

    I take it that is from the copy of the template I gave you? In your original, it was still succeeding?
    Hilary Stoupa

  • 11-18-2022 11:55 AM In reply to

    Re: problems receiving data from stored procedure

    on re-checking, the old form has the same error. Apologies, this form is giving me brain damage I think. I did however get a new error about datatypes when trying to run: The query cannot be run for the following DataObject: approvers InfoPath cannot run the specified query. [0x80040E07][Microsoft OLE DB Provider for SQL Server] Error converting data type varchar to numeric. so i think its at least narrowed down to the stored procedure now.
  • 11-18-2022 11:58 AM In reply to

    Re: problems receiving data from stored procedure

    Oh, I hope so, before this form kills us both. :)
    Hilary Stoupa

  • 11-21-2022 08:27 AM In reply to

    Re: problems receiving data from stored procedure

    still no luck after clearing the datatype errors. no more errors, but still no data. the command is reporting success in the execution history and examining packets sent to the server shows that the SQL statement is being sent, however the server is not receiving the data.
Page 1 of 2 (16 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.