- byte[] byteTimeSheet = Encoding.Default.GetBytes("");
- //change this file to byte in order to save into database.
- FileStream fs = new FileStream(timesheet, FileMode.Open);
- byteTimeSheet = new byte[fs.Length];
- fs.Read(byteTimeSheet, 0, byteTimeSheet.Length);
- fs.Close();
将文件以Byte形式读入,以插入SQL数据库的字段中.
最新推荐文章于 2022-03-10 15:46:56 发布