代码
SQLiteParameter[] parameters = {
new SQLiteParameter("ID",this.txID.Text.Trim() ),
new SQLiteParameter("KEY",this.txKey.Text.Trim() ),
new SQLiteParameter("CONTENT",DbType.Binary),
};

//ASCIIEncoding asiEnc = new ASCIIEncoding();
//byte[] btContent = asiEnc.GetBytes(strContent);

UTF8Encoding asiEnc
= new UTF8Encoding();
byte[] btContent = asiEnc.GetBytes(strContent);

parameters[
2].Value = btContent;


//////////////////////////////////////////////////////////////////
byte[] btContent = (reader["CONTENT"] as byte[]);
if (btContent != null) {
//ASCIIEncoding asiEnc = new ASCIIEncoding();
UTF8Encoding asiEnc = new UTF8Encoding();
Response.Write(asiEnc.GetString(btContent));
}


 

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2021-08-03
猜你喜欢
  • 2022-02-08
  • 2021-07-26
  • 2021-10-10
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案