neverwinter neverwinter - 3 months ago 43
C# Question

Reading sas datasets in c#

I am writing c# add-in for using it in sas enterprise guide. I need to read datasets from sas library via c#. How can I do that?

I inherited myClass from SAS.Tasks.Toolkit.SasTask as below

namespace AB.CD.SASAddin.EF
public class myClass : SAS.Tasks.Toolkit.SasTask

so at the InitializeComponent function if I set

this.RequiresData = true;

It opens a dialog at the begining of add-in start. On the dialog I can select a dataset for calculations. But actually I need to read more than one datasets.

So how can I read any sas library dataset from c# at runtime?

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";


For reading SAS Data in .Net I Used ADO and ADO.NET. You can find detailed in here