thanks in advance
I'm using OleDbConnection's GetOleDbSchemaTable method and it returns some information but i don't know how to ask for cubes on the database or dimensions of a cube.
The code i used in a .aspx file is shown below .
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object semder, EventArgs e) {
OleDbConnection olapConn = new OleDbConnection("Provider=MSOLAP.2;Integrated Security=SSPI;Persist Security Info=False;User ID=usuario;Data Source=local;Location=local;Initial Catalog=FoodMart 2000;Client Cache Size=25;Auto Synch Period=10000") ;
olapConn.Open();
object[] Restricciones = new object[]{"CATALOGNAME" , "SCHEMANAME" , "CUBE_NAME" } ;
DataTable SchemaTable = olapConn.GetOleDbSchemaTable( OleDbSchemaGuid.Tables , Restricciones ) ;
MyDataList.DataSource = SchemaTable.DefaultView;
MyDataList.DataBind();
olapConn.Close();
}
</script>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<!-- #include virtual="/quickstart/aspplus/samples/webforms/customize/header.inc" -->
<ASPataList id="MyDataList" runat="server">
<ItemTemplate>
<b>Media Type: </b><%# ((DataRowView)Container.DataItem)[0] %><br>
<b>Unit Sales: </b><%# ((DataRowView)Container.DataItem)[2] %><br>
</div>
</ItemTemplate>
</ASPataList>
<!-- #include virtual="/quickstart/aspplus/samples/webforms/customize/footer.inc" -->
</body>
</html>
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).