use field-data inside select-command ??? - InfoPath Dev
in

InfoPath Dev

use field-data inside select-command ???

Last post 11-23-2005 12:15 AM by mephisto. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-22-2005 07:47 AM

    use field-data inside select-command ???

    hello,

    i want to filter a secondary-datasource with the select-command by different data-fields. is it possible?

    e.g.
    i have a field called my:fields/my:datestart and i want to filter a table from sql by select ...... where my:fields/my:datestart<='databasefield_date'

    i don´t want to do this by rules! so my question ..... is it possible?

    thx for answers

    mephisto
  • 11-22-2005 09:51 AM In reply to

    Re: use field-data inside select-command ???

    Hi,

    Yes you can. You can adapt the SQL statement of following code snippet to your case:
    string qry = "MyValue";
    ADOAdapterObject oNameTable = (ADOAdapterObject) thisXDocument.DataAdapters["tblTest"];
    oNameTable.Command = string.Format("Select * from tblTest where Test = '" + qry + "'");
    oNameTable.Query();

    Hope that it helps.

    Regards,

    Franck Dauché
    InfoPathDev
  • 11-23-2005 12:15 AM In reply to

    Re: use field-data inside select-command ???

    hello frank,

    thx for your help!
    this is so simple and helpful ;-)

    now i can implement my idea ......

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