A
Adam Goetz
I hope that I'm close with what I currently have :
trying save the data
command.CommandText = "UPDATE ConTable SET imagesignature = ? WHERE ConValue
= '" + sConValue + "';";
command.Parameters.Add("@imagesignature", SqlDbType.Image);
command.Parameters["@imagesignature"].Value = binSignature;
command.ExecuteNonQuery();
try to read the data back
sqlSelectTable.CommandText = "SELECT * from ConTable where ConValue = '" +
sConVlaue + "'";
SqlCeDataReader selectreader = sqlSelectTable.ExecuteReader();
if (selectreader.Read())
{
binSignature = selectreader.GetSqlBinary(ImageField);
};
My save appears to work - it doesn't exception and the SqlCe Query Analyser
shows that the field is non-null - though it doesn't show any data from the
field. Yes there is information in binSignature which is of type SqlBinary.
My load gives a binSignature.Length of 0 and an exception for
binSignature.Value.
Can anyone tell me what I've got wrong?
trying save the data
command.CommandText = "UPDATE ConTable SET imagesignature = ? WHERE ConValue
= '" + sConValue + "';";
command.Parameters.Add("@imagesignature", SqlDbType.Image);
command.Parameters["@imagesignature"].Value = binSignature;
command.ExecuteNonQuery();
try to read the data back
sqlSelectTable.CommandText = "SELECT * from ConTable where ConValue = '" +
sConVlaue + "'";
SqlCeDataReader selectreader = sqlSelectTable.ExecuteReader();
if (selectreader.Read())
{
binSignature = selectreader.GetSqlBinary(ImageField);
};
My save appears to work - it doesn't exception and the SqlCe Query Analyser
shows that the field is non-null - though it doesn't show any data from the
field. Yes there is information in binSignature which is of type SqlBinary.
My load gives a binSignature.Length of 0 and an exception for
binSignature.Value.
Can anyone tell me what I've got wrong?