You don't want the 'foreach' on line 9, you don't want to add a record to the database for every field on the line.
and presuming that the construct cmd.Parameters.Add("@acc", SqlDbType.NVarChar).Value = part[i]; makes sense (I've not seen it before so I'll trust you that it will work). You will need to have each of the command parameters access the appropriate field from the line. In this case I think it should be cmd.Parameters.Add("@acc", SqlDbType.NVarChar).Value = parts[0];
Murtan
Practically a Master Poster
671 posts since May 2008
Reputation Points: 344
Solved Threads: 116