コミュニティ

Scripting - IDataSet 回答済み

Hello, 

I have made a DataSet inside Flexicapture called "ItemsToChange". I've added in 3 columns and inserted 5 rows. 

I now want to create a script in C# .NET to access the 5 rows I created. I have figured out how to get the total rows inside the DataSet but I'm not able to get the values. I've read the help file on the website and that didn't help. I also have been trying to find an example, but failed to do so. 

 

If possible can you please provide an example of how you would do this.

 

How I'm accessing the DataSet = 

IDataSet ds = Context.DataSet("ItemsToChange");

IDataSetQuery dsQuery = ds.CreateQuery();

int RecordsInDs = ds.GetRecordsCount(dsQuery);

//Loop through the DataSet to retrieve rows

for(int i = 0;i < RecordsInDs;i++)

   IDataSetRecord dsRecord = ???

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

1件のコメント

  • Avatar
    Permanently deleted user

    Hello,

    Here is the sample code:

    DataSet dataSet = Context.DataSet("ItemsToChange");

    IDataSetQuery query = dataSet.CreateQuery();

    IRecordset recordSet = dataSet.GetRecords(query);

    for (int i = 0; i < recordSet.Count; i++)

    {

        record = recordSet.GetRecord(i);

        string fullName = record.GetValue(0).ToString();

    }

    0

サインインしてコメントを残してください。