# clear line in notepad C#



## NewRoY (Mar 31, 2010)

{
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?


----------

