dynamic connection to lookup tables - InfoPath Dev
in

InfoPath Dev

dynamic connection to lookup tables

Last post 09-28-2005 08:35 AM by Agni Jonnalagadda. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-22-2005 01:38 AM

    • erezl
    • Not Ranked
    • Joined on 09-06-2005
    • Israel
    • Posts 12

    dynamic connection to lookup tables

    Hi,
    Can we declare secondery data connections dynamically.
    I have a lot of lookup tables from database.
    I have a DB instance in a station in development environment, and a different instance in a station in the customer environment.
    Can I get the relevant station (data source) based on configfile, or can I change a single point of code to effect the connection definition? Can i use odbc connection, instead. Although i saw that the inifopath takes all the defintions including data source and station.
    Each time in the customer i have to change all the secendary cinnections.
  • 09-28-2005 08:35 AM In reply to

    Re: dynamic connection to lookup tables

    Hi erezl,
    You can change your query string dynamically to get values from different tables.
    I dint try but check if you can change the connection string.
    ADOAdapterObject oAdapter =(ADOAdapterObject) thisXDocument.DataAdapters["ConnectioName"];
    oAdapter.Command = string.Format(""Select * from xyz");
    oAdapter.Connection = "Connection String";
    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.