c# - Removes several sets of datacolumns from datatable? -


i'm bulk-uploading excel file 470 columns datatable. due mssql's row size limit of 8060 bytes, need delete many datacolumns. cannot pick-and-choose excel files can upload.

these datacolumns need delete: cols [180-195], [220-245], [320-380], [430-465].

i understand can loop , delete first batch (cols 180-195) using exact column number. 2nd, 3rd, 4th batch, there way besides having subtract total i've deleted col num i'm delete , avoid out-of-index exception?

in case, when 4th batch (430-465) instead of deleting cols 430-465, believe deleting columns 330-365 (15+25+60 previous deletes)

thanks.

in loop, start last column , move towards first one. way can refer original column numbers , don't have deal shifts take place if delete columns in middle.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -