SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert image into database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sanjaypatel62
Starting Member

India
2 Posts

Posted - 02/05/2013 :  00:46:21  Show Profile  Reply with Quote
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

India
2 Posts

Posted - 02/05/2013 :  00:48:54  Show Profile  Reply with Quote
I am performing this action in MS SQL.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/05/2013 :  00:51:40  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000