dbTalk Databases Forums  

OLAP (Analisys Services) from .NET for WebPages

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss OLAP (Analisys Services) from .NET for WebPages in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
george
 
Posts: n/a

Default OLAP (Analisys Services) from .NET for WebPages - 03-31-2004 , 08:36 PM






H

I want to connect to Analisys Services Database from .NET on C

I'm try this simple exampl

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,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.Ope

I've install on server: SQL Server 2000 sp3, Analisys Services sp3 y Visual Studios .NET 2000 with Framework 1.

somebody have a idea

thanks

Reply With Quote
  #2  
Old   
Dennis Redfield
 
Posts: n/a

Default Re: OLAP (Analisys Services) from .NET for WebPages - 04-01-2004 , 10:13 AM






perhaps Database FoodMart don't exist
"george" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
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])";
Quote:
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



Reply With Quote
  #3  
Old   
 
Posts: n/a

Default Re: OLAP (Analisys Services) from .NET for WebPages - 04-01-2004 , 12:02 PM



what are the database roles, is it still everyone?
I've been able to connect through .net.


Quote:
-----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


.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.