[Gtk-sharp-list] save in firebird serialized text

Juan Antonio Olintonatiuh Betancourt Zúñiga jaobetancourtz at gmail.com
Mon Dec 2 06:28:27 UTC 2013

ok, I have a textview and I want to save content, that's what 
serialized, with the following code.

     protected byte[] serializar(TextBuffer buffer)
         TextIter inicio, final;
         buffer.GetBounds(out inicio, out final);
         Atom serialFormat = buffer.RegisterDeserializeTagset(null);
         byte[] datos = buffer.Serialize(buffer, serialFormat, inicio, 
         return datos;
I have to read this one

     protected Gtk.TextBuffer deserealizar (byte[] datos)
         TextBuffer txtBuffer = textview2.Buffer;
         Gdk.Atom serialFormat = txtBuffer.RegisterDeserializeTagset(null);
         ulong datostamano = (ulong) datos.LongLength;
         TextIter start = txtBuffer.StartIter;
         txtBuffer.Deserialize(txtBuffer, serialFormat, ref start, 
datos, datostamano);

         return txtBuffer;

the code works, but when I insert firebird

     insert ... value (serializar(textview.buffer))

i cant read the byte

how can insert the byte?, the db has a blob field, perhaps insert wrong

So how would the proper way to insert and read it in firebird?

More information about the Gtk-sharp-list mailing list