C# 读取blob 数据byte[]

C# 读取blob 数据byte[]

猿掌柜
2022-05-13 / 0 评论 / 37 阅读 / 正在检测是否收录...

笔记直接代码
核心代码

byte[] data = Array.Empty<byte>();
while (reader.Read())
   {
      long len = reader.GetBytes(reader.GetOrdinal("PRPD"), 0, null, 0, 0);
      byte[] buffer = new byte[len];
      len = reader.GetBytes(reader.GetOrdinal("PRPD"), 0, buffer, 0, (int)len);
      data = buffer;
   }

OK,结束

2

评论 (0)

取消