Leggere dati da blob tramite select in firebird.
Conversione da System.byte[] in string
....
FbCommand cmd = new FbCommand("select * from articoli order by nome asc", db.GetConnection());
FbDataReader dr = cmd.ExecuteReader();
if (!dr.HasRows)
return;
while (dr.Read())
{
byte[] bytes = (byte[])dr["descrizione"];
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
string descrizione = enc.GetString(bytes);
....Related posts:
No Comments