문제

I know it can be with a field 'image' on my table or the route something like 0x0002346sfh.. I rather to learn how to save the image with the route because I guess the database would be much faster that way, does anyone know the query to do this? Because I don't want to create a project in visual basic just to save a picture in my database I want to do this with a query if it's possible.

올바른 솔루션이 없습니다

다른 팁

On Sql Server 2008 you can save an image in a field with type image or varbinary.

I advice you to use varbinary because image is deprecated.

To save in this field you must write a procedure to launch an INSERT/UPDATE statement.

You can try something like this:

CREATE TABLE ImageTable (id int, [image] varbinary(max) ) 

INSERT INTO ImageTable ([image])
SELECT *
FROM OPENROWSET(BULK N'D:\Scenario1.jpg', SINGLE_BLOB) image;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top