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
 How to Insert the Images in DB
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

grandhi
Starting Member

31 Posts

Posted - 05/16/2013 :  08:28:46  Show Profile  Reply with Quote
Hi All,

I want to insert images in table,for that purpose I wrote the following code.


CREATE TABLE ImageTesting(picture Image)
insert into ImageTesting(picture ) values ('C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg')


after evaluation,I am getting like (1 row(s) affected)

after seeing result,I thought successfully inserted.again for my testing I evaluated The following query.

select * from ImageTesting


it returns,some number format of data.

How can I solve this?

can anyone help me.

Thank you

immad
Posting Yak Master

Pakistan
219 Posts

Posted - 05/16/2013 :  08:56:36  Show Profile  Reply with Quote

i think the number data that u calling is binary data.

can u show me that number data

immad uddin ahmed

Edited by - immad on 05/16/2013 08:58:50
Go to Top of Page

grandhi
Starting Member

31 Posts

Posted - 05/16/2013 :  09:21:11  Show Profile  Reply with Quote
the number format is following below

433A5C55736572735C5075626C69635C50696374757265735C53616D706C652050696374757265735C4368727973616E7468656D756D2E6A7067
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 05/17/2013 :  00:07:57  Show Profile  Reply with Quote
you need to use OPENROWSET bulk

see
http://www.java2s.com/Tutorial/SQLServer/0100__Data-Types/InsertingorUpdatinganImageFileUsingOPENROWSETandBULK.htm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
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.06 seconds. Powered By: Snitz Forums 2000