Добрый день.
Делаю вот так:
SqlConnection connection = new SqlConnection(SettingsSingleton.connectionString);
connection.Open();
string strSql = "update icon set icon = @icon where id = 1";
SqlCommand command = new SqlCommand(strSql, connection);
command.Parameters.Add("@icon", SqlDbType.VarBinary);
FileStream file = new FileStream(_path, FileMode.Open);
byte[] bytes = new byte[file.Length];
file.Read(bytes, 0, (int) file.Length);
command.Parameters[0].Value = bytes;
command.ExecuteNonQuery();
file.Close();
connection.Close();
Все работает. Но когда говорю:
select icon from icon;
NULL
В чем дело ?
Заранее благодарен.
... << RSDN@Home 1.1.4 beta 3 rev. 220>>