Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a text file
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Reading a text file
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01070038
Message ID:
01070038
Vues:
54
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!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform