Reading data from another database

C

Cooptoons

Here is what I am trying to do. I created a database that keeps track of our
parts that we repair and the current condition and location of the parts. I
use infopath so our techs can all access the database from the company shared
drive and make any changes needed. Other departments in our company have
databases that keep track of receiving and shipping of parts and other
things. I would like to be able to when we search for a part by serial number
that infopath could also get the receive and shipping information from the
other databases just to display.
 
S

S.Y.M. Wong-A-Ton

You can add the other databases as secondary data sources to your form if
they are either Access or SQL Server dbs. If they are not, you'll have to use
a web service to retrieve the data. The filtering on serial number will be a
challenge if you want to use repeating tables or sections to show your data,
since these controls can only filter data that is bound to the Main form, so
you'll have to do the filtering through code. Otherwise you can use drop-down
list boxes, which you can always filter, but it's not practical to use these
if the receive and shipping information contain more than 1 field.
 
C

Cooptoons

Do you have an example of the code I can go by?

S.Y.M. Wong-A-Ton said:
You can add the other databases as secondary data sources to your form if
they are either Access or SQL Server dbs. If they are not, you'll have to use
a web service to retrieve the data. The filtering on serial number will be a
challenge if you want to use repeating tables or sections to show your data,
since these controls can only filter data that is bound to the Main form, so
you'll have to do the filtering through code. Otherwise you can use drop-down
list boxes, which you can always filter, but it's not practical to use these
if the receive and shipping information contain more than 1 field.
 
S

S.Y.M. Wong-A-Ton

Do a search in this newsgroup on "Secondary data source query". You need to
add a WHERE-clause to the Command for the secondary data sources. The
WHERE-clause should include the filter for the serial number.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top