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:

  1. Convertire i bytes in kb,mb,gb
  2. Conversione da unixtime alla data human
  3. Convertire unixtime in date su android
  4. Errore “no such group basic_setup” durante l’uso di snmpconf su debian
  5. Leggere la posta in terminal in Ubuntu 8.04

About The Author

No Comments

Leave A Reply