![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I want to connect to Analisys Services Database from .NET on C# I'm try this simple example DataSet myDS; myDS = new DataSet(); string ConnStr; ConnStr ="Provider=MSOLAP;Password=sa;Persist Security Info=True;User ID=sa;Data Source=TAMLCS2;Initial Catalog=FoodMart 2000;"; string SQLSelect; SQLSelect = "with member [Measures].[Store Profit Rate] as '([Measures].[Store Sales]-[Measures].[Store Cost])/[Measures].[Store |
|
System.Data.OleDb.OleDbConnection mySqlConn; mySqlConn = new System.Data.OleDb.OleDbConnection(ConnStr); mySqlConn.Open(); System.Data.OleDb.OleDbDataAdapter mySqlDA; mySqlDA = new System.Data.OleDb.OleDbDataAdapter(SQLSelect,ConnS tr); mySqlDA.Fill(myDS); MyGrid.DataSource = myDS.Tables[0].DefaultView; MyGrid.DataBind(); The error message is : Database FoodMart don't exist in line : mySqlConn.Open I've install on server: SQL Server 2000 sp3, Analisys Services sp3 y Visual Studios .NET 2000 with Framework 1.1 somebody have a idea? thanks |
#3
| |||
| |||
|
|
-----Original Message----- perhaps Database FoodMart don't exist "george" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:225A190D-226C-455A-A9D9- 50B1EAA782FF (AT) microsoft (DOT) com... Hi I want to connect to Analisys Services Database from .NET on C# I'm try this simple example DataSet myDS; myDS = new DataSet(); string ConnStr; ConnStr ="Provider=MSOLAP;Password=sa;Persist Security Info=True;User ID=sa;Data Source=TAMLCS2;Initial Catalog=FoodMart 2000;"; string SQLSelect; SQLSelect = "with member [Measures].[Store Profit Rate] as '([Measures].[Store Sales]-[Measures].[Store Cost])/ [Measures].[Store Cost]', format = '#.00%' select {[Measures].[Store Cost],[Measures].[Store Sales],[Measures].[Store Profit Rate]} on columns,Order ([Product].[Product Department].members, [Measures].[Store Profit Rate], BDESC) on rows from Sales where ([Time].[1997])"; System.Data.OleDb.OleDbConnection mySqlConn; mySqlConn = new System.Data.OleDb.OleDbConnection (ConnStr); mySqlConn.Open(); System.Data.OleDb.OleDbDataAdapter mySqlDA; mySqlDA = new System.Data.OleDb.OleDbDataAdapter (SQLSelect,ConnStr); mySqlDA.Fill(myDS); MyGrid.DataSource = myDS.Tables[0].DefaultView; MyGrid.DataBind(); The error message is : Database FoodMart don't exist in line : mySqlConn.Open I've install on server: SQL Server 2000 sp3, Analisys Services sp3 y Visual Studios .NET 2000 with Framework 1.1 somebody have a idea? thanks . |
![]() |
| Thread Tools | |
| Display Modes | |
| |