正在阅读:在SQL Server中保存和输出图片在SQL Server中保存和输出图片

2004-04-01 13:25 出处:PConline 作者:cashcho翻译/中国软件 责任编辑:pjl
在SQL Server中保存和输出图片 cashcho(翻译) 关键字 SQL Server images 出处 http://www.bipinjoshi.com/ 介绍   有时候我们需要保存一些binary data进数据库。SQL Server提供一个叫做image的特殊数据类型供我们保存binary data。Binary data可以是图片、文档等。在这篇文章中我们将看到如何在SQL Server中保存和输出图片。 建表   为了试验这个例子你需要一个含有数据的table(你可以在现在的库中创建它,也可以创建一个新的数据库),下面是它的结构:
Column Name Datatype Purpose
ID Integer identity column Primary key
IMGTITLE Varchar(50) Stores some user friendly title to identity the image
IMGTYPE Varchar(50) Stores image content type. This will be same as recognized content types of ASP.NET

IMGDATA
Image Stores actual image or binary data.
键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品