![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been unable to connect using an AdomdConnection. I've tried different changes to the connection string and still get an error that says, "Either the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW database, or the database does not exist.". The database does exist, and my account is a member of the DB. I can also browse cubes with BI Studio. I set my account in the DB to db_Owner thinking it was a security problem and still can't connect. Any suggestions please? Here's some sample code: Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI") connection.Open() Dim cubeCount As Integer = connection.Cubes.Count connection.Close() connection.Dispose() It blows up on Cubes.Count. Thanks. |
#3
| |||
| |||
|
|
AdventureWorksDW is a relational database, the sample OLAP database is called Adventure Works. Also you would want to use the msolap provided to access the cubes, not the relational SQL Server driver. Note you will need to be set up as an administrator or under role in the OLAP database. Once the OLAP database is processed it does not need to access the AdventureWorksDW database, so it will not matter what your rights are there. Try the following: Dim connection As New AdomdConnection("Provider=msolap.3;Data Source=localhost;Initial Catalog=Adventure Works;Integrated Security=SSPI") connection.Open() Dim cubeCount As Integer = connection.Cubes.Count connection.Close() connection.Dispose() -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <2E438033-008C-4924-8C0A-2107472FFBD2 (AT) microsoft (DOT) com>, "=?Utf- 8?B?VGVycnkgU21pdGg=?=" <Terry Smith (AT) discussions (DOT) microsoft.com> says... I've been unable to connect using an AdomdConnection. I've tried different changes to the connection string and still get an error that says, "Either the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW database, or the database does not exist.". The database does exist, and my account is a member of the DB. I can also browse cubes with BI Studio. I set my account in the DB to db_Owner thinking it was a security problem and still can't connect. Any suggestions please? Here's some sample code: Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI") connection.Open() Dim cubeCount As Integer = connection.Cubes.Count connection.Close() connection.Dispose() It blows up on Cubes.Count. Thanks. |
#4
| |||
| |||
|
|
Thanks for your response, but I still have the problem. I've tried AdventureWorksDW and AdventureWorks. (Some the examples online use AdventureWorksDW instead of AdventureWorks by the way.) I tried changing the provider as well as making myself db_Owner on the AdventureWorks database and still get the same error. What else could it be? "Darren Gosbell" wrote: AdventureWorksDW is a relational database, the sample OLAP database is called Adventure Works. Also you would want to use the msolap provided to access the cubes, not the relational SQL Server driver. Note you will need to be set up as an administrator or under role in the OLAP database. Once the OLAP database is processed it does not need to access the AdventureWorksDW database, so it will not matter what your rights are there. Try the following: Dim connection As New AdomdConnection("Provider=msolap.3;Data Source=localhost;Initial Catalog=Adventure Works;Integrated Security=SSPI") connection.Open() Dim cubeCount As Integer = connection.Cubes.Count connection.Close() connection.Dispose() -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <2E438033-008C-4924-8C0A-2107472FFBD2 (AT) microsoft (DOT) com>, "=?Utf- 8?B?VGVycnkgU21pdGg=?=" <Terry Smith (AT) discussions (DOT) microsoft.com> says... I've been unable to connect using an AdomdConnection. I've tried different changes to the connection string and still get an error that says, "Either the user, TSMITH\Terry Smith, does not have access to the AdventureWorksDW database, or the database does not exist.". The database does exist, and my account is a member of the DB. I can also browse cubes with BI Studio. I set my account in the DB to db_Owner thinking it was a security problem and still can't connect. Any suggestions please? Here's some sample code: Dim connection As New AdomdConnection("Provider=SQLNCLI.1;Data Source=localhost;Initial Catalog=AdventureWorksDW;Integrated Security=SSPI") connection.Open() Dim cubeCount As Integer = connection.Cubes.Count |
![]() |
| Thread Tools | |
| Display Modes | |
| |