G
Guest
I have a data set called “ProductDataSet.xsd†that include several tables one
called [Drive Packages] with 14 columns and several rows of data. The table
adaptor attached to this is a table adapter called “Drive Package
TableAdapterâ€. To this table adapter I have added several queries:
One called list Data
SELECT [Drive Package ID], [Drive Nomenclature] AS Drive,
[HP Max] AS HP, [RPM Max] AS [Max RPM],
[RPM Min] AS [Min RPM]
FROM [Drive Package]
WHERE ([Product Line ID] = ProductLineID) AND ([Unit Size] = UnitSize)
ORDER BY [Drive Nomenclature]
The two procedures are called FillListData and GetByListdata
When I excite the following statement
DataTable ListData =
this.drive_PackageTableAdapter.GetListData(ProductLineID, UnitSize);
The columns I have aliased above are now where to be seen. For this quarry
I did not need them explicitly because I bound them to a C1 flex grid.
Although, I did have to make five columns in the right order and names. Note
I the correct amount of rows for the where clause.
The second one Max Mins
SELECT MAX([HP Max]) AS MaxHPMax, MIN([RPM Min]) AS MinRPMMin,
MAX([RPM Max]) AS MaxRPMMax
FROM [Drive Package]
WHERE (([Product Line ID] = ProductLineID) AND ([Unit Size] =
UnitSize));
The two procedures are called FillMaxMins and GetMaxMins.
Again exciting
DataTable dataMaxMins = this.drive_PackageTableAdapter.GetMaxMins(2, "086");
The aliases are no where to be seen. This one returns only one record and
it did. So I tried:
object[] MaxMins = new object[3];
MaxMins = this.drive_PackageTableAdapter.GetMaxMins(2,
"086").Rows[0].ItemArray;
And I can see the data I want but it is tacken on the end of an array of 14
items. One for each column in the orignal table and the there ones above.
The question is how do I get the coliums in the quary and only the colums in
the quary? These are not complacte quaries and if I can not use the dataset
for these what good is it.
called [Drive Packages] with 14 columns and several rows of data. The table
adaptor attached to this is a table adapter called “Drive Package
TableAdapterâ€. To this table adapter I have added several queries:
One called list Data
SELECT [Drive Package ID], [Drive Nomenclature] AS Drive,
[HP Max] AS HP, [RPM Max] AS [Max RPM],
[RPM Min] AS [Min RPM]
FROM [Drive Package]
WHERE ([Product Line ID] = ProductLineID) AND ([Unit Size] = UnitSize)
ORDER BY [Drive Nomenclature]
The two procedures are called FillListData and GetByListdata
When I excite the following statement
DataTable ListData =
this.drive_PackageTableAdapter.GetListData(ProductLineID, UnitSize);
The columns I have aliased above are now where to be seen. For this quarry
I did not need them explicitly because I bound them to a C1 flex grid.
Although, I did have to make five columns in the right order and names. Note
I the correct amount of rows for the where clause.
The second one Max Mins
SELECT MAX([HP Max]) AS MaxHPMax, MIN([RPM Min]) AS MinRPMMin,
MAX([RPM Max]) AS MaxRPMMax
FROM [Drive Package]
WHERE (([Product Line ID] = ProductLineID) AND ([Unit Size] =
UnitSize));
The two procedures are called FillMaxMins and GetMaxMins.
Again exciting
DataTable dataMaxMins = this.drive_PackageTableAdapter.GetMaxMins(2, "086");
The aliases are no where to be seen. This one returns only one record and
it did. So I tried:
object[] MaxMins = new object[3];
MaxMins = this.drive_PackageTableAdapter.GetMaxMins(2,
"086").Rows[0].ItemArray;
And I can see the data I want but it is tacken on the end of an array of 14
items. One for each column in the orignal table and the there ones above.
The question is how do I get the coliums in the quary and only the colums in
the quary? These are not complacte quaries and if I can not use the dataset
for these what good is it.