>Not sure why I'm getting that.<Probably because your prior statement
line = file.ReadLine();
isn't returning anything (most likely returning null).
Have you tried tracing this stuff in debug?
~~Bonnie
>Lets see, I changed it up a bit, and now I'm getting an error, before it was completing but not inserting into my DB.
>
>Now at "string upc = line.substring(16,12)" it says I have an object reference not set to an instance of an object. Not sure why I'm getting that.
>
>for (int i = 1; i < counter; i++)
>{
>line = file.ReadLine();
>string upc = line.Substring(16,12);
>Insert(upc,"test");
>progressBar1.PerformStep();
>}
>MessageBox.Show("ICPro Alert","Upload Complete",MessageBoxButtons.OK,MessageBoxIcon.Information);
>file.Close();
>
>Thanks for the help.