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.
Author |
Topic |
chinna1214
Starting Member
21 Posts |
Posted - 2015-02-20 : 08:23:28
|
ho can i retrieve blob data from a table? ex: if i have given a image in table when i was retrieving data instead of image it is showing some logical address. How could i find the exact picture i have inserted in.Harish |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-02-20 : 09:39:34
|
please post:1. CREATE TABLE statement for the table containing the blob2. SELECT query where you retrieve the blob3. Any application logic you use to display the picture once retrieved. |
|
|
chinna1214
Starting Member
21 Posts |
Posted - 2015-02-23 : 02:12:01
|
I have created table generally through SSMS. Have created a table named images. And given 2 feilds ID and Image.For insertion of data i have used the statement:insert into si1(id,image) SELECT 1,BulkColumn FROM Openrowset( Bulk 'C:\Users\HA294289\Desktop\AccuRev_Logo_bigger.png', Single_Blob) as imgWhere Si1 is the table name, id and image are respective columns in that table.The data was successfully inserted into the table. My problem is while i want to see the data inside table in the ID column i can get the value, but where is in the image column i am getting a binary value. I want to retrieve the exact image which we have given as input from that available binary data getting from the result.For retrieving blob i haven't given any select query. Only for retrieving table data i have given select query.I havent used any application logic to display the picture.quote: Originally posted by gbritton please post:1. CREATE TABLE statement for the table containing the blob2. SELECT query where you retrieve the blob3. Any application logic you use to display the picture once retrieved.
Harish |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-02-23 : 13:53:03
|
BLOBs are stored as binary values in SQL. That is the exact image in binary. What are you hoping to see? Note that you will not see the image as an image inside SSMS. You need some application programming to do that, e.g. in a web page or in an Excel worksheet. |
|
|
chinna1214
Starting Member
21 Posts |
Posted - 2015-02-24 : 01:18:02
|
Thanx gbritton. I know that we cant see the image inside ssms itself. In mysql there is a option to view the image directly in mysql it self. But here in Mssql we dont have that option ri8. Is there a way to view it out side like you said in webpage or in excel sheet. If so please let me know the process. quote: Originally posted by gbritton BLOBs are stored as binary values in SQL. That is the exact image in binary. What are you hoping to see? Note that you will not see the image as an image inside SSMS. You need some application programming to do that, e.g. in a web page or in an Excel worksheet.
Harish |
|
|
|
|
|