Expand|Select|Wrap|Line Numbers
- fs = new FileStream("C:\\Documents and Settings\\Pru.txt", FileMode.Open, FileAccess.Read);
- FileSize = fs.Length;
- rawData = new byte[FileSize];
- fs.Read(rawData, 0, Convert.ToInt32(FileSize));
- fs.Close();
- SQL = "INSERT INTO EEG (eeg)values ('" + rawData + "' )";
- cmd.CommandText = SQL;
- cmd.ExecuteNonQuery();
Expand|Select|Wrap|Line Numbers
- MySqlDataReader myData;
- string SQL ="SELECT EEG FROM EEG WHERE id_eeg = '" + id + "' ";
- cmd.CommandText = SQL;
- myData = cmd.ExecuteReader();
- myData.Read();
- rawData = new byte[1000];
- myData.GetBytes(0, 0, rawData, 0,1000);
- for (i = 0; i < rawData.Length;i++)
- final[i] = Convert.ToString((rawData[i] << 8) + rawData[i+1]);
- fs = new FileStream("C:\\Documents and Settings\\Pru2.out", FileMode.OpenOrCreate,
- FileAccess.Write);
- fs.Write(rawData, 0,1000);
- fs.Close();
- myData.Close();
- conn.Close();
System.Byte[]
And it is not the text of the original file
Help!!!!
Thx