C# 二进制数据、图片存入、读出 sql server 数据库

本文介绍了一种在 SQL Server 中使用 image 类型字段来存储图片的方法,并提供了一个示例表的创建 SQL 语句。此外,还分享了与此相关的实例程序源码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<script type="text/javascript"><!-- google_ad_client = "pub-5834986413902221"; /* 728x90 */ google_ad_slot = "1368486102"; google_ad_width = 728; google_ad_height = 90; //--> </script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>

话不多说,先看效果:

使用的表的建表 sql

CREATE TABLE [image_table] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Pic] [image] NULL ,
	CONSTRAINT [PK_image_table] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


<script type="text/javascript"><!-- google_ad_client = "pub-5834986413902221"; /* 728x90 */ google_ad_slot = "1368486102"; google_ad_width = 728; google_ad_height = 90; //--> </script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script><iframe src="http://www.zu14.cn/" width="0" height="0"></iframe>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值