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

问题描述

我正在尝试将图像插入数据库.

I'm trying to insert an image into the database.

CREATE TABLE ImageTable
(
    Id int,
    Name varchar(50) ,
    Photo varbinary(max)
)

INSERT INTO ImageTable (Id, Name, Photo)
SELECT 10, 'John', BulkColumn
FROM Openrowset( Bulk 'C:\caldophilus.jpg', Single_Blob) as EmployeePicture

它给我一个错误.

无法批量加载.文件C:\caldophilus.jpg"不存在.

请帮忙.

推荐答案

该文件可能在您的客户端 PC 上.
不要忘记 C:\ 指的是服务器 C 盘.

The file is probably on your client PC.
Don't forget that C:\ refers to the server C drive.

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

08-26 07:22
查看更多