如何上传文件以及如何将其保存在数据库中? [英] How to upload file and how to save it in database?

查看:172
本文介绍了如何上传文件以及如何将其保存在数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在创建一个asp.net应用程序.在我的应用程序中,我需要上传不同格式的文件(jpeg,woc,pdf等).我该怎么做?
我正在使用oracle作为后端.是否可以将这些项目以其打开的格式存储在数据库中?

请为我提供代码..

Hi,
Am creating one asp.net application. In my application i need to upload different format files (jpeg,woc,pdf etc).How can i do that?
Am using oracle as backend. Is it possible to store these items in their on format in database?

please provide me the code..

推荐答案

使用 ^ ]-该链接包含一个示例.

您可以在Oracle的BLOB字段中存储任何文件内容.请记住,将文件名与数据分开存储,但要存储在同一行中.
Use a FileUpload Control[^] - the link includes an example.

You can store any file content in Oracle in a BLOB field. Remember to store the file name separately from the data, but in the same row.


是的,您可以这样做.
看看下面的文章...
1. 使用Asp.net将文件保存到Oracle 10g [ ^ ].
2. 在Oracle中上传图片 [使用ASP.Net(VB.Net)在Oracle数据库中存储和显示图像(在BLOB字段中) ) [ ^ ].

谢谢...
Yes you can do it.
Take a look at the articles below...
1. Save files to Oracle 10g using Asp.net[^].
2. Image upload in Oracle[^].
3. Storing and Displaying Image (in BLOB field) in Oracle Database using ASP.Net (VB.Net)[^].

Thanks...



请参阅下面的链接以获取类似的解决方案:
在C#中将文件上传到数据库 [使用GridView从数据库上传和下载文件 [ ^ ]
MSDN:FileUpload类 [
Hi,
Refer the links below for the similar solution:
Uploading files to database in C#[^]
Upload and Download File From Database Using GridView[^]
MSDN : FileUpload Class[^]


Hope it helps!
--Amit


这篇关于如何上传文件以及如何将其保存在数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆