I have built a Analysis Services and apply Data Mining by Bussness Intelligent Development Studio. Now i have a prediction query as the follows:
SELECT
PredictAssociation([Association].[v User Subscribe Product], INCLUDE_STATISTICS, 3)
From
[Association]
NATURAL PREDICTION JOIN
(SELECT (SELECT 'Ipad 1' AS [Product Name]
UNION SELECT 'Ipad 2' AS [Product Name]
UNION SELECT 'Iphone 3GS' AS [Product Name]
UNION SELECT 'Iphone 5C' AS [Product Name]) AS [v User Subscribe Product]) AS t
And my result view in SQL Management Studio as the follows:

I using ADOMD.NET to get the READER the show on my application. My code as the belows:
var command = new AdomdCommand(DMXQuery, SqlConnectionHelper.GetConnectionSSAS());
var reader = command.ExecuteReader();
Every things is going to be ok. Reader execute still ok. But i don't know how to get "PRODUCT NAME" exactly. Reader included it, but i dont know how to get.
Does is anybody know this?
Tks for advance.
while (reader.Read())
{
Console.Write(reader[0]); // Your product name
// Other fields
for (int i = 1; i < reader.FieldCount; i++)
{
Console.Write(reader[i] + " ");
}
Console.WriteLine();
}
reader.Close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With