Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading a text file
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Reading a text file
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01070038
Message ID:
01070038
Views:
56
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
Map
View

Click here to load this message in the networking platform