Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert image into database

Author  Topic 

sanjaypatel62
Starting Member

2 Posts

Posted - 2013-02-05 : 00:46:21
Hi,
How can I insert image into database. datatype of image is varbinary and it should be stored as a BlobImpl object by which I can access it from my jave code like..
rs.next();
Blob blob=rs.getBlob(1);

Please help.

sanjaypatel62
Starting Member

2 Posts

Posted - 2013-02-05 : 00:48:54
I am performing this action in MS SQL.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-05 : 00:51:40
INSERT INTO YourTable (ImageField)
SELECT * FROM OPENROWSET(BULK N'Image_path', SINGLE_BLOB) as t

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -