首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SSIS & EzAPI:在HRESULT: 0xC0048021中调用EzDerivedColumn的构造函数

SSIS & EzAPI:在HRESULT: 0xC0048021中调用EzDerivedColumn的构造函数
EN

Stack Overflow用户
提问于 2015-01-23 21:16:07
回答 1查看 292关注 0票数 0

我遇到了SSIS & EzAPI的一个问题。这是密码

代码语言:javascript
复制
EzPackage package = new EzPackage();
package.Name = "[Insert My Table Name]";
EzDataFlow parent = new EzDataFlow(package);
dataFlow.Name = package.Name;    

EzFlatFileCM destConn = new EzFlatFileCM(parent);
destConn.ConnectionString = connectionString;
destConn.Format = FlatFileFormat.Delimited;
destConn.ColumnDelimiter = "";
destConn.RowDelimiter = "\n";
destConn.ColumnNamesInFirstDataRow = false;
destConn.LocaleID = 127;

if (isUnicode)
    destConn.CodePage = 65001;

EzFlatFileDestination destination = new EzFlatFileDestination(parent);
destination.Connection = destConn;
destination.Overwrite = true;

/// ColumnSchema is a container for some column information
foreach (ColumnSchema col in columns)
{
    IDTSConnectionManagerFlatFileColumn100 newColumn = data.Columns.Add();
    newColumn.ColumnType = "Delimited";
    newColumn.DataType = col.Type;
    newColumn.ColumnDelimiter = IsLastColumnInArray(col ) ? "\n" : "";
    newColumn.ColumnWidth = (col.Type == DbColumnType.LongString) ? (int) Constants.LongStringLength : (int) Constants.StringLength;

    var columnName = newColumn as IDTSName100;
    if (columnName != null)
         columnName.Name = GetColumnAlias(col.Name, columns);
}

List<EzFlatFileDestination> destinations = new List<EzFlatFileDestination>();
destinations.Add(destin);

/// This line will blow up
EzDerivedColumn derivedColumn = new EzDerivedColumn(parent);

错误消息:

代码语言:javascript
复制
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in EzAPI.dll

Additional information: Exception from HRESULT: 0xC0048021

现在,下面是我的设置:-我安装了Microsoft 2012客户端SDK,并确保所有的v110 all都安装在程序文件和EzAPI.dll中(是的,他们都说11.0.0.0) --我通过下载最新的EzAPI源代码:https://sqlsrvintegrationsrv.codeplex.com/SourceControl/latest构建了EzAPI。我确保项目中的所有DLL引用都指向11.0.0.0和特定版本= true --在GAC和程序文件中还有其他版本的Microsoft.SqlServer.****.dll文件,比如用于v100和v120的。但是,这些其他版本的DLL不在程序中的其他任何地方使用,它们也不包括在我的程序的bin文件夹中。- .NET版本在构建EzAPI.dll时是4.5,在我的项目中

不管怎样,我很困惑。我在网上发现了带有这个错误的文章,但是他们通常会讨论DLL是如何错配的,或者有些DLL没有被安装,但是我看不出这些场景是如何适用于我的。我是不是滥用了EzDerivedColumn?嗯,很难知道,因为我的错误信息非常模糊。

在这方面任何帮助都会很好。谢谢!

EN

回答 1

Stack Overflow用户

发布于 2015-01-30 13:51:36

我建议您使用以下链接中描述的方法,以便在运行时获得有关错误消息的更详细信息:

在包生成过程中调试COMException

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28118875

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档