Thanks XLD for reply
but i tried that one also
when i was looking code in break mode i takes value of colcounter as 17 so i think it is not running as per loop means 1 to total column specified by user.

again when i do some R&D in codes it paste NULL values to some or all fields in SQL which even SQL wont recognize & u have to truncate the table.

pl refer the attachment & see where it turns into a bug