English 中文(简体)
• 如何在C#中制造离线的法律事务厅(法律厅)河。
原标题:How to create offline OLAP cube in C#?
  • 时间:2009-11-25 16:35:23
  •  标签:
  • c#
  • olap-cube

我在使用以下代码从C#中产生一条离线的立方位孔径:

using (var connection = new OleDbConnection())
    {
       connection.ConnectionString = "Provider=MSOLAP;  Initial Catalog=[OCWCube];  Data Source=C:\temp\test.cub;  CreateCube=CREATE CUBE [OCWCube] (   DIMENSION [NAME],    LEVEL [Wszystkie] TYPE ALL,    LEVEL [NAME],   MEASURE [Liczba   DESCRIPTIO]    FUNCTION COUNT  );  InsertInto=INSERT INTO OCWCube([Liczba   DESCRIPTIO], [NAME].[NAME])  OPTIONS ATTEMPT_ANALYSIS  SELECT Planners.DESCRIPTIO, Planners.NAME  FROM Planners Planners;  Source_DSN="CollatingSequence=ASCII;DefaultDir=c:\temp;Deleted=1;Driver={Microsoft dBase Driver (*.dbf)};DriverId=277;FIL=dBase IV;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=600;SafeTransactions=0;Statistics=0;Threads=3;UserCommitSync=Yes;";Mode=Write;UseExistingFile=True";
        try
        {
            connection.Open();
        }
        catch (OleDbException e)
        {
            Console.WriteLine(e);
        }
    }

我保留以下例外:

“多步行动产生错误。 核对每个办公室数据库的状况价值。 不采取行动

我从Excel生成的OQY档案中抽取了字面上的链接。 我必须加上“Mode=Write”一节,否则,我又成为另一个例外(“档案可能正在使用”)。

连接如何? 如何诊断错误? 有些人请指导我......

问题回答

最近,我发现这三部分辅导,我希望这有助于你。

rel=“nofollow” http://netpl.blogspot.com/2007/11/complete-olap-infraruct- Without.html

当时,微软支持为我找到了工作解决办法! 这非常简单——连接的最后一个部分应当这样看:

Source_DSN=dbfodbc32; Mode=ReadWrite; UseExistingFile=False

最重要的部分是“Mode=ReadWrite; UseExistingFile=False

在经过这一修改后,适当建立了多瑙河。 希望这一帮助。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签