Combining Two Data Sources for one Data List

W

Winterminute

I am binding the results of a database query to a DataList using the
following code:

SqlDataAdapter myCommand = new SqlDataAdapter("SELECT * FROM
_Hardware_Configurations", myConnection);
DataSet myDs = new DataSet();
myCommand.Fill(myDs, "_Hardware_Configurations");
dtlConfigurations.DataSource =
myDs.Tables["_Hardware_Configurations"].DefaultView;
dtlConfigurations.DataBind();

What I would like to do is for every record returned I want to use that
information to query another datasource (WMI) and then intermix it into the
DataList.

For example, the SQL query is a list of server names. For each server name
returned, I wanted to go off and query that server using WMI and retrieve
the OS and display it inline with each record. I have the WMI stuff done; I
just am not sure how to append the WMI data to the Data List or otherwise
access that WMI data within the ItemTemplate of my code-front

Does that make sense?
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top