General information
Category:
Coding, syntax and commands
Title:
Reading a text file
Environment versions
Network:
Windows 2003 Server
I'm trying to read a text file....and trying to insert some of the information into a DB but I cant seem to pick anything up, not sure what I'm doing wrong:
TextReader file = new StreamReader(textBox1.Text.Trim());
string line;
for (int i = 1; i{
line = file.ReadLine();
string upc = line.Substring(16,12);
//call insert class
Insert("insert into icchek (upc,item) values ('"+upc.Trim()+"',test");
progressBar1.PerformStep();
}
Any help that would be great!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only