图像保存在数据库中 [英] Image save in database

查看:46
本文介绍了图像保存在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将上传的图像保存到数据库.现在我的问题是:

I want to save an uploaded image to database. Now my question is:

  1. SQL Server 2000 图像的数据类型应该是什么?一种.图片湾varbinary

  1. What should be the data type for SQL Server 2000 for image? a. image b. varbinary

在数据库中保存图片的代码是什么?

what is the code for saving image in database?

如何从数据库中检索图像并显示?

How to retrieve the image from database and show?

请向我推荐任何教程或指南.或者如果可以的话,请与我分享.

Please refer me any tutorial or guidline. Or if you can please share with me.

提前致谢.

推荐答案

数据类型应该是文本,因为将图像保存到数据库的最佳方法是保存其路径.让您的操作系统完成存储实际文件的工作.

The data type should be text because the best way to save an image to a database is to save its path. Let your OS do the job of storing the actual files.

这篇关于图像保存在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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