QuestionQ218

VerifiedData Manipulation

Given a database dt with the following header:

Surname, Address, Zip Code, Given Name, Phone Number.

What is the correct Invoke Method activity configuration so that the resulting header is:

Surname, Given Name, Address, Zip Code, Phone Number?

Explanation

DataColumn.SetOrdinal(Int32) moves a column to the specified zero-based position. Applying SetOrdinal(1) to dt.Columns("Given Name") moves Given Name from ordinal 3 to ordinal 1, shifting Address and Zip Code right and yielding the required column order.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!