Insert records in a table using RecordInsertList

static void InsertRecordInDbusingList(Args _args)
{
    RecordInsertList insertList = null;
    Table1 table1;
   
    insertList = new RecordInsertList(tablenum(Table1));
   
    table1.Field1 = “1”;
    table1.Field2 = “2”;
    table1.Field3 = “3”;
   
    insertList.add(table1);
   
    table1.Field1 = “4”;
    table1.Field2 = “5”;
    table1.Field3 = “6”;
   
    insertList.add(table1);
   
    ttsbegin;
    insertList.insertDatabase();
    ttscommit;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: