I am trying to create a local cube populating data from either access,oracle or sql.
At the momt the example below shows ,data being populated from an access database.
But when I complile this code it gives me an error sayin,' Syntax error in column definition'
So I wann check my statements specific to the cube, i.e the Create Cube statement,Insert into statement and Select statement.
So if any of u know an editor or parser or where I can get it from ,please let me know.
Thanks for sparing time...

Private Sub cmdClick_Click()

Dim cnCube As ADODB.Connection
Dim s As String
Dim strProvider As String
Dim strDataSource As String
Dim strSourceDSN As String
Dim strSourceDSNSuffix As String
Dim strCreateCube As String
Dim strInsertInto As String
Dim strSource As String

On Error GoTo Error_cmdCreateCubeFromDatabase_Click

strSource = Connection(1)
strCreateCube = getCreateCube()
strInsertInto = getInsertInto()

Set cnCube = New ADODB.Connection

s = strSource & ";" & strCreateCube & ";" & strInsertInto & ";"

Screen.MousePointer = vbHourglass

cnCube.Open s

Screen.MousePointer = vbDefault
Exit Sub

Screen.MousePointer = vbDefault
MsgBox Err.Description
If Err.Number <> 0 Then
msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & Chr(13) & Err.Description
MsgBox msg, , "Error", Err.HelpFile, Err.HelpContext
End If

End Sub
Private Function Connection(idbtype As Long) As String

'''''''''''''''''''''''''Database Connection to the Cube''''''''''''''''''

strProvider = "PROVIDER=MSOLAP"
strDataSource = "DATA SOURCE=c:\OlapCube.cub"
strSourceDSN = "SOURCE_DSN=AccessLoyd"
Connection = strProvider & ";" & strDataSource & ";" & strSourceDSN
End Function
Private Function getCreateCube() As String

''''''''''''''''''''''''''Create cube Structure'''''''''''''''''''''''''''
Dim strCreateCube As String
strCreateCube = "CREATECUBE=CREATE CUBE cbia( "
strCreateCube = strCreateCube & "DIMENSION[SSTORE],"
strCreateCube = strCreateCube & "LEVEL[SSTORE Name],"
strCreateCube = strCreateCube & "MEASURE [SSTORE Sales] "
strCreateCube = strCreateCube & "Function Sum "
strCreateCube = strCreateCube & "Format '#.#')"
getCreateCube = strCreateCube
End Function
Private Function getInsertInto() As String
'''''''''''''''''''''''''''Insert Clause and Select Clause'''''''''''''''''

Dim strInsertInto As String
'''''''''''''''''''''''''''Table name.Column Name''''''''''''''''''''''''''

strInsertInto = strInsertInto & "INSERTINTO=INSERT INTO cbia( SSTORE.[STORE Name],"
strInsertInto = strInsertInto & "Measures.[STORE Sales])"
strInsertInto = strInsertInto & "SELECT SSTORE.STORE_NAME AS COL1,"
strInsertInto = strInsertInto & "SSTORE.STORE_SALES AS COL2"
strInsertInto = strInsertInto & "FROM [SSTORE]"
getInsertInto = strInsertInto
End Function