单击按钮时如何将文件夹中的文件保存到数据库中 [英] How to Save a file that is in a folder into database on button Click

查看:91
本文介绍了单击按钮时如何将文件夹中的文件保存到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!!!

我有一种情况,单击按钮后,必须将文件夹中的图像保存到数据库中.
我正在开发通行证应用程序.我已经将网络摄像头所单击的图像保存到一个文件夹中,但是我一直坚持如何在单击按钮时将其保存到数据库中.

请指导我该怎么办!我不想将此图像的路径插入数据库,但单击图像本身,然后单击保存"按钮.

Hello !!!

I have a situation where i have to save a image that is in a folder into database on button click.
I am working on an gate pass application. I have saved image that is being clicked by webcam into a folder but i am stuck at how to save this into databse on button click.

please guide me what should i do !!I don''t want to insert path of this image into database but the image itself whan button Save is clicked.

推荐答案

您已将图像保存在本地文件夹中.
现在将图像的保存路径插入到数据库中.
You have saved the image in your local folder.
now insert the path of the image where it is saved into the database.


您好,

我在代码项目中找到了一篇文章.它会为您服务,

请检查使用Microsoft .NET从SQL Server存储和检索图像 [ ^ ]

尽管您尚未指定数据库,但是在上面的文章中,它是MSSQL

谢谢
-Amit Gajjar
Hi,

I found an article in code project. it will work for you,

Please check Storing and Retrieving Images from SQL Server using Microsoft .NET[^]

Although you have not specified your database but here in above article it''s MSSQL

Thanks
-Amit Gajjar


您需要使用文件上传控件.
请参阅以下文章
使用ASP.NET上传文件 [
You need to use the file upload control.
Refer the below article
File Upload with ASP.NET[^]


这篇关于单击按钮时如何将文件夹中的文件保存到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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