介绍 有时候我们需要保存一些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. 保存images进SQL Server数据库
(编辑:aniston)
·2024年12月目录 ·2024年11月目录 ·2024年10月目录 ·2024年9月目录 ·2024年8月目录 ·2024年7月目录 ·2024年6月目录 ·2024年5月目录 ·2024年4月目录 ·2024年3月目录 ·2024年2月目录 ·2024年1月目录 ·2023年12月目录 ·2023年11月目录