Как добавить файлы в бд и отобразить в DataGrid или в чём либо другом. Я пробывал так:
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string fName = openFileDialog1.FileName;
if (fName != null)
{
// Создаем поток для чтения файла с диска:
FileStream fs = new FileStream(fName, FileMode.Open, FileAccess.Read);
byte[] buf = new byte[fs.Length];
// :и читаем файл в буфер
fs.Read(buf, 0, (int)fs.Length);
profileDataGridView.Rows[1].Cells[6].Value = buf;
}
}
База MSSQL Compact 3.5