Community

Error in DataSet script , "Context" does not exist in current context

Hi,

I craeted 1 dataset `Car_ID`with 1 column only `CarID` .. I selected source as `Script`, using C# .Net to update the dataset from csv file. Im getting the error "The name Context does not exist in the current context"

My code is 

IDataSet dataSet = Context.DataSet("Care_ID");

IDataSetRecord rec=dataSet.CreateRecord();

rec.AddValue("CarID" , "TestCarID000");

dataSet.AddRecord(rec);

 

I used the exaple in ABBYY Flexicapture Guide about Dataset update script:

https://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/idataset

 

What could be the issue in my script & why Context is not identified hereÉ

Thank you!

Zina 

 

0

Comments

1 comment

  • Avatar
    Scott Chau

    Might be easier to set a System DSN.  You can then map it to the CSV.  Then you can use the ODBC connection to link to the DSN.

    As for the your code, if you look at the upper left hand corner, you invoke the dataset method in C#, its Dataset and not the normal Context like in regular field rules.  

    0

Please sign in to leave a comment.