如何使用代码复制文件? [英] how to copy files using code?
本文介绍了如何使用代码复制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
仅使用asp.net中的代码将访问文件从c驱动器复制到sql数据库的方法
how to copy access files from the c drive to a sql database using code only in asp.net
推荐答案
0)将文件作为流加载
1)将流转换为字节数组
2)将字节数组保存到数据库中的一列(图像类型).
Google是您的朋友.
0) Load the file as a stream
1) Convert the stream to an array of bytes
2) Save the byte array to a column (of type Image) in the database.
Google is your friend.
这篇关于如何使用代码复制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文