如何在数据库中保存图像 [英] how to save images in database
问题描述
嗨
想要将图像保存在数据库中..
我已经创建了表格
列数据类型值
ImageID int不为null
ImageName varchar(50)Null
图像varchar(MAX)Null
现在我将数据插入表中....
ImageID ImageName图像
1朵玫瑰这部分我应该给什么
2.我应该如何将图像显示到我的aspx页面中?...
我正在使用detailsview分发员工的数据...
我的任务是用图像显示员工数据...
希望您能理解我的问题????
Hi
iwant to save images in database..
i have created the table
column datatype values
ImageID int Not null
ImageName varchar(50) Null
Image varchar(MAX) Null
Now i am inserting the data into the table....
ImageID ImageName Image
1 rose what should i give in this part
2.how should i display the image into my aspx page....
i am using detailsview to dispaly the data of the employee...
Here my task is to dispaly the employee data with image...
I hope u have understood my question???
推荐答案
以下链接可能对您有所帮助:
如何将图像插入数据库 [ ^ ]
从SQL数据库存储和检索图像使用ASP.Net [
Following links might help you:
how to insert images into database[^]
Store and Retrieve Image from SQL Database using ASP.Net[^]
And Please learn how to use Google.
Good luck.
您将数据类型作为blob而不是varchar(MAX)
看到这里有一些例子.
http://www.codeproject.com/Articles/33310/C-Save-and-Load-Image-from-Database
http://stackoverflow.com/questions/3548401/how- to-save-image-in-database-using-c-sharp [
hi ,
you have a take a data type as blob but not varchar(MAX)
see here have some example.
http://www.codeproject.com/Articles/33310/C-Save-and-Load-Image-from-Database
http://stackoverflow.com/questions/3548401/how-to-save-image-in-database-using-c-sharp[^]
这篇关于如何在数据库中保存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!