How to retrieve data from Ms Access into Infopath - InfoPath Dev
in

InfoPath Dev

How to retrieve data from Ms Access into Infopath

Last post 12-06-2005 10:50 PM by zach007. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-06-2005 08:51 PM

    How to retrieve data from Ms Access into Infopath

    Dear Experts,

    I have a form containing: EmployeeID, FirstName, LastName, Address, Telephone and Email (in my Ms Access database and called as a CUSTOMER table).

    What should I do, if I would like to retrieve data by following action:

    If I type the employee ID then click "Retrieve" button (or show button), then the rest of information will be appeared on each textfields such as FirstName, LastName, and so on.

    Has anyone knows how to do this please?

    I really need you helps.

    Thank you for your kind helps.

    Best Regards,

    Rully
  • 12-06-2005 10:15 PM In reply to

    Re: How to retrieve data from Ms Access into Infopath

    Hi Rully,

    Welcome to InfoPathDev!
    You could do it through a secondary data source and through code, using something around:

    string qry = "MyValue";
    ADOAdapterObject oNameTable = (ADOAdapterObject) thisXDocument.DataAdapters["tblTest"];
    oNameTable.Command = string.Format("Select * from tblTest where Test = '" + qry + "'");
    oNameTable.Query();

    In your case, qry would be the employee ID read in a textbox.

    your output values (from your secondary DOM) could be displayed with textboxes on your form.

    Regards,

    Franck Dauché
  • 12-06-2005 10:50 PM In reply to

    Re: How to retrieve data from Ms Access into Infopath

    Hi,

    Thanks for your helps..However, where to put all codes that you gave to me? Infopath or Access..???...if in Infopath, which part should I put the code in and also for Access, which part should I put in about the codes...???...and the tblTest is CUSTOMER (in my case)? and how about oNameTable? which one should I change?...is it just "qry" that need to be changed please? Please help me more details since I am a newbie for Inforpath..

    Thank you for your kind helps and attention.

    Best Regards,

    Rully

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