Store Byte array in SQLite using Blob

后端 未结 2 1083
陌清茗
陌清茗 2021-01-01 05:12

For my application I\'m trying to store a byte array in my SQLite application, I\'m filling my SQLite database this way:

public bool InsertMessage()
    {
           


        
2条回答
  •  礼貌的吻别
    2021-01-01 05:34

    Use an overload of SQLiteParameter that takes the DBType parameter:

    var dataParameter = new SQLiteParameter("Data", DbType.Binary) { Value = data };
    pars.Add(dataParameter);
    

提交回复
热议问题