【文件属性】:
文件名称:保存文件到sqlserver数据库
文件大小:584B
文件格式:TXT
更新时间:2017-05-02 17:19:01
文件流保存
C# 保存文件到数据库字段
attach new BusAttach ;
FileInfo fi new FileInfo txtAttach Text Trim ;
attach Fix fi Extension Substring 1 ToLower Trim ;
FileStream fs fi OpenRead ;
byte[] bytes new byte[fs Length];
fs Read bytes 0 Convert ToInt32 fs Length ;
fs Close ;
attach Attach bytes;">C# 保存文件到数据库字段
attach new BusAttach ;
FileInfo fi new FileInfo txtAttach Text Trim ;
attach Fix fi Extension Substring 1 ToLower Trim ;
FileStream fs fi OpenRead ;
byte[] bytes new byte[fs Length];
fs Read bytes 0 Convert ToInt32 fs Length ;
fs Close ;
attach [更多]
网友评论
- 嗯 不是我想要的