If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Local Olap cube- Oracle data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-02-04, 08:29
loydon@dbforums loydon@dbforums is offline
Registered User
 
Join Date: Jul 2004
Posts: 24
Local Olap cube- Oracle data

Hi chaps,

I am trying to create a local cube ,populating data from an oracle database.

I have checked the connection part of the string.. Its working fine.

The problem is -- it throws an error msg-- Fact Table not found...

Dim strCreateCube As String
Dim sSourceDSN As String
Dim sInsertInto As String
Dim adocon As New ADODB.Connection
Dim sLocation As String
sLocation = "LOCATION=C:\CubeOracle.cub"
strCreateCube = ""
strCreateCube = strCreateCube & "CREATECUBE= CREATE CUBE MYCUB " & vbCrLf
strCreateCube = strCreateCube & " (" & vbCrLf
strCreateCube = strCreateCube & " DIMENSION Product," & vbCrLf
strCreateCube = strCreateCube & " LEVEL [Product Family]" & vbCrLf
strCreateCube = strCreateCube & ")"
sInsertInto = ""
sInsertInto = sInsertInto & "INSERTINTO=INSERT INTO MYCUB" & vbCrLf
sInsertInto = sInsertInto & " (" & vbCrLf
sInsertInto = sInsertInto & " Product.[Product Family]" & vbCrLf
sInsertInto = sInsertInto & " )" & vbCrLf
sInsertInto = sInsertInto & " SELECT " & vbCrLf
sInsertInto = sInsertInto & " sales_fact_1997.[Product:Product Family]" & vbCrLf
sInsertInto = sInsertInto & " FROM sales_fact_1997" & vbCrLf
sInsertInto = sInsertInto & " WHERE sales_fact_1997.[Time:year]='1997'"

stSourceDSN = """Provider=MSOLAP;" & _
"Data Source=qspl_quantlink;" & _
"User ID=scott;" & _
"Password=tiger"""

sSourceDSN = "SOURCE_DSN=" & stSourceDSN

strConnection = sLocation & ";" & vbCrLf & sSourceDSN & ";" & vbCrLf & strCreateCube & ";" & vbCrLf & sInsertInto

MsgBox strConnection
Set cn = New ADODB.Connection
cn.Provider = "MSOLAP"
cn.Open strConnection

MsgBox "Cube created!"
adocon.Close

ProcExit:
Exit Sub
ProcErr:
MsgBox Err.Number & Err.Description & Err.Source


I have also replaced the string provider=OraOLEDB.Oracle & MSDAORA.1 instead of olap but it still gives the same error....


Could u pls tell me what is the problem.. Do I need to create a fact table physically in the oracle database and realate it to the other dimension tables or what else do I need to check.

Thnx
Loydon
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On