首页 > 代码库 > c# 字符串转Byte[],如何将Byte[]插入到Oracle Blob
c# 字符串转Byte[],如何将Byte[]插入到Oracle Blob
byte[] xx=Encoding.Default.GetBytes("12121232");
插入数据库
string sqlStr = "update sys_tab t set t.big_logo =:BIG_LOGO,t.small_logo=:SMALL_LOGO where id=:ID";
OracleParameter[] parameterValue = http://www.mamicode.com/{
new OracleParameter(":BIG_LOGO",OracleType.Blob),
new OracleParameter(":SMALL_LOGO",OracleType.Blob),
new OracleParameter(":ID",OracleType.VarChar,50),
};
parameterValue[0].Value = http://www.mamicode.com/Encoding.Default.GetBytes("12121232");
parameterValue[1].Value =http://www.mamicode.com/ Encoding.Default.GetBytes("12sad1232");
parameterValue[2].Value = http://www.mamicode.com/Id;
oracle.Excute(sqlStr, parameterValue);
c# 字符串转Byte[],如何将Byte[]插入到Oracle Blob