在 C# 中读取 sas 数据集
Reading sas datasets in c#
我正在编写 c# 插件以便在 sas enterprise guide 中使用它。我需要通过 C# 从 sas 库中读取数据集。我该怎么做?
我从 SAS.Tasks.Toolkit.SasTask 继承了 myClass,如下所示
namespace AB.CD.SASAddin.EF
{
[ClassId("11187e27-6c84-47f2-8700-9edaf8bf8634")]
[Version(1.0)]
[IconLocation("AB.CD.SASAddin.EF.GH.ico")]
public class myClass : SAS.Tasks.Toolkit.SasTask
....
所以在 InitializeComponent 函数中,如果我设置
this.RequiresData = true;
它在加载项开始时打开一个对话框。在对话框中,我可以 select 用于计算的数据集。但实际上我需要阅读不止一个数据集
那么如何在运行时从 C# 读取任何 sas 库数据集?
private void InitializeComponent()
{
this.RequiresData = true;
this.GeneratesSasCode = false;
this.GeneratesReportOutput = false;
this.ProcsUsed = "ARBOR, SQL";
this.ProductsRequired = "BASE";
this.TaskCategory = "QQ";
this.TaskDescription = "QQQ";
this.TaskName = "XXX";
}
为了在 .Net 中读取 SAS 数据,我使用了 ADO 和 ADO.NET。您可以在 here
中找到详细信息
我正在编写 c# 插件以便在 sas enterprise guide 中使用它。我需要通过 C# 从 sas 库中读取数据集。我该怎么做?
我从 SAS.Tasks.Toolkit.SasTask 继承了 myClass,如下所示
namespace AB.CD.SASAddin.EF
{
[ClassId("11187e27-6c84-47f2-8700-9edaf8bf8634")]
[Version(1.0)]
[IconLocation("AB.CD.SASAddin.EF.GH.ico")]
public class myClass : SAS.Tasks.Toolkit.SasTask
....
所以在 InitializeComponent 函数中,如果我设置
this.RequiresData = true;
它在加载项开始时打开一个对话框。在对话框中,我可以 select 用于计算的数据集。但实际上我需要阅读不止一个数据集
那么如何在运行时从 C# 读取任何 sas 库数据集?
private void InitializeComponent()
{
this.RequiresData = true;
this.GeneratesSasCode = false;
this.GeneratesReportOutput = false;
this.ProcsUsed = "ARBOR, SQL";
this.ProductsRequired = "BASE";
this.TaskCategory = "QQ";
this.TaskDescription = "QQQ";
this.TaskName = "XXX";
}
为了在 .Net 中读取 SAS 数据,我使用了 ADO 和 ADO.NET。您可以在 here
中找到详细信息