SQL Query - InfoPath Dev
in

InfoPath Dev

SQL Query

Last post 02-06-2007 01:52 PM by rpowell4600. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-02-2007 02:51 PM

    SQL Query

    I am trying to perform a query against a SQL database. I have established a good data connection to the table. I want to query the table for "EmplID", then return the First, Last & M.I. back to the appropriate textbox fields. But when I run the query I get the following msg "Object Required". I know this is telling me I do not have the table name in my namespace path. If I wanted to verify my namespace, how can I find the fully qualified namespace path and will my code return the desired information.

    {
    var currentElementID = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:ADVHR-EMPL/@EmplID").text;
    myDataAdapter = XDocument.DataAdapters("ADVHR-EMPL");
    myDataAdapter.Command = "select EMPL_LAST_NM, EMPL_FIRST_NM from ADVHR-EMPL WHERE EMPLOYEE_ID = '" + currentElementID + "'";
    myDataAdapter.Query();
    }
  • 02-06-2007 05:29 AM In reply to

    Hi rpowell4600,

    not 100% if that is what you are looking for but i usually use this little trick.

    Put an Expression Box to your form, click the fx button, select Insert Field or Group, select your secondary datasource and select the field or group you want to know the xpath for. then in the insert formula widnow check the box "edit xpaht (advanced)". There you go.

    Hope it helps
    Listen to Motörhead cos they play Rock'n Roll :)
  • 02-06-2007 01:52 PM In reply to

    Thanks I will give that a try.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.