dbTalk Databases Forums  

Error running MDX statement in VB application

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


Discuss Error running MDX statement in VB application in the microsoft.public.sqlserver.olap forum.



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

Default Error running MDX statement in VB application - 08-07-2003 , 02:25 AM






Hi!
I generated an MDX statement in my vb.6 application. The
query works when i run it in the MDX Sample Application.
However, when I tried running it in my vb6 application, I
keep getting this error and when I checked my cellset's
state, it is equal to 1. What am I doing wrong? Please
help.

Thanks in advance.


Liv

sample code:

everything works until oCellSet.Open strMDX -- strMDX is
my MDX query.

m_strMDXConnectString = _
"Provider=MSOLAP.2;USER ID=user;Password=123;"
& _
"DATA SOURCE=server01;INITIAL
CATALOG=sampleCUBE;"

Dim oCellSet As New ADOMD.Cellset
Set oCellSet = New ADOMD.Cellset

oCellSet.ActiveConnection = m_strMDXConnectString

oCellSet.Open strMDX
Debug.Print strMDX

MsgBox "state = " & oCellSet.State


Reply With Quote
  #2  
Old   
Matt Carroll [MS]
 
Posts: n/a

Default Re: Error running MDX statement in VB application - 08-07-2003 , 12:56 PM






See reply to your previous posting.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Liv" <lcastillo (AT) sequelsolutions (DOT) com> wrote

Quote:
Hi!
I generated an MDX statement in my vb.6 application. The
query works when i run it in the MDX Sample Application.
However, when I tried running it in my vb6 application, I
keep getting this error and when I checked my cellset's
state, it is equal to 1. What am I doing wrong? Please
help.

Thanks in advance.


Liv

sample code:

everything works until oCellSet.Open strMDX -- strMDX is
my MDX query.

m_strMDXConnectString = _
"Provider=MSOLAP.2;USER ID=user;Password=123;"
& _
"DATA SOURCE=server01;INITIAL
CATALOG=sampleCUBE;"

Dim oCellSet As New ADOMD.Cellset
Set oCellSet = New ADOMD.Cellset

oCellSet.ActiveConnection = m_strMDXConnectString

oCellSet.Open strMDX
Debug.Print strMDX

MsgBox "state = " & oCellSet.State




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.