Hello Kalyan,
HTH
Jörg
'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************
Function Main()
set conn = CreateObject("ADODB.CONNECTION")
set cset = CreateObject("ADOMD.CELLSET")
conn.open "Provider=MSOLAP.2;Data Source=localhost;Initial Catalog=Foodmart
2000"
cset.open "select {measures.[store sales]} on 0 ,[Gender].members on 1 from
sales",conn
for i = 0 to cset.axes(1).positions.count -1
msgbox cset.axes(1).positions(i).members(0).caption & ":" &
cset(0,i).FormattedValue
next
cset.close : set cset = nothing
conn.close : set conn = nothing
Main = DTSTaskExecResult_Success
End Function
"Kalyan" wrote:
Quote:
Does any body have sample code to execute MDX query using VB script,
Please share with me,
Thanks
Kalyan |