Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help required in creating local cube?

Status
Not open for further replies.

survu

Programmer
Apr 5, 2002
2
0
0
US
Hello,


I am working on OLAP technology especially with creating cube files(.cub). I have some technical issues for which I request you to suggest me the possible solutions.

a) Is it possible to create a cube without using DSN for connection. I am using one external project to get the data for from oracle . Pro-C to connect oracle database, can I use the available data from oracle tables to create the cube by using that external project, with out using DSN.
b) I have to create a .cub file programmatically, I have some VB samples in help, I need
one example in C++ to create a cube .Cub file.

C) Is it possible to create a cube with out connecting to DSN.
The idea is to create the cube by passing some parameterised values which are read from an external program. The dimensions and measure are passed as parameters to the CreateCube property . The CreateCube should be able to generate a cube using those parameter values and the underlying data will also be passed as a string value.

D) .Doubt:

I have a Sample Program to create cube .Cub file , which I have pasted it below.

// ‘RAPS’ is oracle DSN, when I connect to any mdb DSN its working fine, if I use Oracle DSN its giving error: [Microsoft][ODBC Driver for Oracle][oracle]ORA-00903;Invalid Table Name;37000’ as invalid table name , I tried in many ways. I have the doubt that is it possible to connect to Oracle DSN for creating the cubes , .cub files.

Private Sub cmdCreateDocForCube_Click()
Dim cn As ADODB.Connection
Dim s As String
Dim strProvider As String
Dim strDataSource As String
Dim strSourceDSN As String
Dim strCreateCube As String
Dim strInsertInto As String

strProvider = "PROVIDER=MSOLAP"
strDataSource = "DATA SOURCE=c:\TestPldb.cub"
strSourceDSN = "SOURCE_DSN=RAPS

strCreateCube = "CREATECUBE=CREATE CUBE pldbtest( "
strCreateCube = strCreateCube & "DIMENSION [MBD],"
strCreateCube = strCreateCube & "LEVEL [All MBDs] TYPE ALL,"
strCreateCube = strCreateCube & "LEVEL [DESCRIPTION] ,"
strCreateCube = strCreateCube & "MEASURE [Salesunit] "
strCreateCube = strCreateCube & "Function Sum "
strCreateCube = strCreateCube & "Format '#.#' )"


strInsertInto = strInsertInto & "INSERTINTO=INSERT INTO pldbtest( MBD.[Description],"
strInsertInto = strInsertInto & "Measures.[Salesunit] )"
strInsertInto = strInsertInto & "SELECT MBD.DESCRIPTION AS Col1,"
strInsertInto = strInsertInto & "sc_pldb_16_test2.salesunit AS Col2,"
strInsertInto = strInsertInto & "From [sc_pldb_16_test2], [MBD] "
strInsertInto = strInsertInto & "Where [sc_pldb_16_test2].[MBDCODE] = [MBD].[MBDCODE] "

Set cn = New ADODB.Connection
Dim strPrompt As String
s = strProvider & ";" & strDataSource & ";" & strSourceDSN & ";" & strCreateCube & ";" & strInsertInto & ";"
cn.Open s

End Sub

Best Regards,

Suresh V
 
try dso instead of creating it with ado. it seems to me to work cleaner and quicker as far as creating cubes go
 
use excel 2000
you can create a local cube in a very easy way
read the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top