Jump to content

clear data line in notepad

- - - - -

  • Please log in to reply
No replies to this topic

#1
royvb

royvb

    Newbie

  • Members
  • Pip
  • 5 posts
{
OracleConnection oracleConect = null;
string connectStr = "User Id=Masaledsar;Password=password;Data Source=test.mlo.ug.com";
oracleConect = new OracleConnection(connectStr);
oracleConect.Open();

StreamReader objStreamReader;
objStreamReader = File.OpenText("C:\\test.txt");
objStreamReader.ReadLine();
string contents = null;
ArrayList arrText = new ArrayList();

while ((contents = objStreamReader.ReadLine()) != null)
{
string[] parts = contents.Split('\t');
OracleCommand cmd = oracleConect.CreateCommand();
cmd.Connection = oracleConect;
Console.WriteLine(contents);
arrText.Add(contents);

if (parts.Length>=12)
{
// insert to oracle

}




}
oracleConect.Close();
}




the program function is to read data by line from notepad and insert into oracle.
i juz made a code and its run successfully.

now im trying to clear all the line tranfer into new txt file.
any idea?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users