qurying using date ranges - InfoPath Dev
in

InfoPath Dev

qurying using date ranges

Last post 08-08-2005 12:56 PM by Agni Jonnalagadda. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-08-2005 11:15 AM

    • r10701
    • Not Ranked
    • Joined on 07-19-2005
    • Posts 4

    qurying using date ranges

    I have a form connected to an access database. Is it possible to query information using multiple date ranges?
  • 08-08-2005 12:56 PM In reply to

    Re: qurying using date ranges

    Yes it is possible, you just need to change the command of the dataconnection if you want to change the query with which you getting the data from DB.
    Here is how you can change the query of a DB data connection in code

    ADOAdapterObject oAdapter = (ADOAdapterObject) thisXDocument.DataAdapters["DatabaseConnectioName"];

    //Here you can write any code that you want.
    oAdapter.Command = string.Format("select * from table1 where date1 > date2 and date3 < date2");
    oAdapter.Query();

    Agni
    InfoPath Dev India
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.