Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a text file
Message
De
18/11/2005 13:22:35
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
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:
01070327
Vues:
15
>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.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform