Binary data

Help
Anonymous
2004-01-27
2004-02-20
  • Anonymous - 2004-01-27

    Hello.

    Im trying to fill a mysql row with my binary data.
    With OleDb and Access everything works fine.
    Now im using MysqlDriverCS and i got some problems. My source looks like this:

    command.CommandText = "INSERT INTO _files VALUES ('" + obj.ID + "','" + this.GetTimestamp() + "',@data,'" + obj.DataLength + "','" + obj.Filename + "')";
    command.Parameters.Add("@data", System.Data.DbType.Binary);
    ((MySQLParameter) command.Parameters["@data"]).Value = obj.Data;

    The obj.Data field returns a bytes array. But the row just contains the string representation ("byte[]") of the byte array.

    Any comments?

    Alex

     
    • Stenio Brunetta

      Stenio Brunetta - 2004-02-20

      I obtain the same results with TEXT fields!

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks