After digging a little more I found out that a blob is always returned as a byte[]. Until beta4/final1 the following code provides a way arround it.
 
to string:
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
textBoxDescription.Text = enc.GetString((byte[])table.Rows[0]["description"]);
 
to byte:
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
parameter = refConfig.provider.CreateParameter();
parameter.Value = encoding.GetBytes(textBoxDescription.Text);
parameter.DbType = DbType.String;
parameter.ParameterName = "@description";
command.Parameters.Add(parameter);
 
command.Prepare();
command.ExecuteNonQuery()
 

Reply via email to