Friday, March 30, 2012
inserted the image in a column-how can i view the image
i have inserted the image present in mydocuments using alter command
create table aa(a int, d image)
insert into aa values (1,'F:\prudhvi\baba 002.jpg')
when i do
select * from aa
i am getting the result in the column d as
0x463A5C707275646876695C70727564687669203030322E6A 7067
how i can i view the image?
pls clarify my doubt
satish
Hi,
Sql is used for storing data... and image data is stored as varibale length
binary data...
image datatype...
Variable-length binary data from 0 through 231-1 (2,147,483,647) bytes.
Thats why you got that value...
For seeing it... just follow the below link... it uses ASP.NET and the "LOAD
FILE FROM DATABASE" property of text.
http://support.microsoft.com/default...b;en-us;326502
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"satish" wrote:
> hi,
> i have inserted the image present in mydocuments using alter command
> create table aa(a int, d image)
> insert into aa values (1,'F:\prudhvi\baba 002.jpg')
> when i do
> select * from aa
> i am getting the result in the column d as
> 0x463A5C707275646876695C70727564687669203030322E6A 7067
>
> how i can i view the image?
> pls clarify my doubt
> satish
>
inserted the image in a column-how can i view the image
i have inserted the image present in mydocuments using alter command
create table aa(a int, d image)
insert into aa values (1,'F:\prudhvi\baba 002.jpg')
when i do
select * from aa
i am getting the result in the column d as
0x463A5C707275646876695C70727564687669203030322E6A7067
how i can i view the image?
pls clarify my doubt
satishHi,
Sql is used for storing data... and image data is stored as varibale length
binary data...
image datatype...
Variable-length binary data from 0 through 231-1 (2,147,483,647) bytes.
Thats why you got that value...
For seeing it... just follow the below link... it uses ASP.NET and the "LOAD
FILE FROM DATABASE" property of text.
http://support.microsoft.com/default.aspx?scid=kb;en-us;326502
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"satish" wrote:
> hi,
> i have inserted the image present in mydocuments using alter command
> create table aa(a int, d image)
> insert into aa values (1,'F:\prudhvi\baba 002.jpg')
> when i do
> select * from aa
> i am getting the result in the column d as
> 0x463A5C707275646876695C70727564687669203030322E6A7067
>
> how i can i view the image?
> pls clarify my doubt
> satish
>
inserted the image in a column-how can i view the image
i have inserted the image present in mydocuments using alter command
create table aa(a int, d image)
insert into aa values (1,'F:\prudhvi\baba 002.jpg')
when i do
select * from aa
i am getting the result in the column d as
0x463A5C707275646876695C70727564687669203030322E6A 7067
how i can i view the image?
pls clarify my doubt
satishUse WRITETEXT/READTEXT instead of INSERT/SELECT to store / retrieve
There is quite a detailed explanation in Books Online
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"satish" <satishkumar.gourabathina@.gmail.com> wrote in message
news:1141732028.000941.183610@.e56g2000cwe.googlegr oups.com...
> hi,
> i have inserted the image present in mydocuments using alter command
> create table aa(a int, d image)
> insert into aa values (1,'F:\prudhvi\baba 002.jpg')
>
> when i do
> select * from aa
> i am getting the result in the column d as
> 0x463A5C707275646876695C70727564687669203030322E6A 7067
>
> how i can i view the image?
>
> pls clarify my doubt
>
> satish|||satish (satishkumar.gourabathina@.gmail.com) writes:
> i have inserted the image present in mydocuments using alter command
> create table aa(a int, d image)
> insert into aa values (1,'F:\prudhvi\baba 002.jpg')
> when i do
> select * from aa
> i am getting the result in the column d as
> 0x463A5C707275646876695C70727564687669203030322E6A 7067
>
> how i can i view the image?
You have not inserted the the image into the table. You have inserted the
disk location of the image into the table. Run
SELECT convert(varchar(80), d) FROM aa
to see.
There is no way to insert data into a column directly from a file. The
normal way of loading image is write a program that reads the file,
and the passes the binary stream through a parameterised INSERT statement
in a client API. You can also convert the contents to a hexstring and
build an INSERT statement from that.
Conversly, to display the image you also need an application. If you
have stored an image in a table, a SELECT on that table in Query Analyzer
or Mgmt Studio will only display a long hex string.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
inserted the image in a column-how can i view the image
i have inserted the image present in mydocuments using alter command
create table aa(a int, d image)
insert into aa values (1,'F:\prudhvi\baba 002.jpg')
when i do
select * from aa
i am getting the result in the column d as
0x463A5C707275646876695C7072756468766920
3030322E6A7067
how i can i view the image?
pls clarify my doubt
satishHi,
Sql is used for storing data... and image data is stored as varibale length
binary data...
image datatype...
Variable-length binary data from 0 through 231-1 (2,147,483,647) bytes.
Thats why you got that value...
For seeing it... just follow the below link... it uses ASP.NET and the "LOAD
FILE FROM DATABASE" property of text.
http://support.microsoft.com/defaul...kb;en-us;326502
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"satish" wrote:
> hi,
> i have inserted the image present in mydocuments using alter command
> create table aa(a int, d image)
> insert into aa values (1,'F:\prudhvi\baba 002.jpg')
> when i do
> select * from aa
> i am getting the result in the column d as
> 0x463A5C707275646876695C7072756468766920
3030322E6A7067
>
> how i can i view the image?
> pls clarify my doubt
> satish
>sql
Monday, March 26, 2012
Insert Word document into image field
SQL server 7 or 2000 via ASP?
Thanks
MoroBCheck out the following links:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui07312001.asp
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q258038
--
HTH,
SriSamp
Please reply to the whole group only!
"MoroB" <m.bonini@.abax.it> wrote in message
news:09b001c3a2c2$7cfff450$a601280a@.phx.gbl...
> How can I insert a Word document into a image field in
> SQL server 7 or 2000 via ASP?
> Thanks
> MoroB|||Hi,
This is what we used, takes a bit of reading, and ignore
the .net stuff but it works.
http://support.microsoft.com/default.aspx?scid=KB;EN-
US;Q194975&
>--Original Message--
>How can I insert a Word document into a image field in
>SQL server 7 or 2000 via ASP?
>Thanks
>MoroB
>.
>|||Does It work for Visual Studio or also with asp, that
it's what i need?
MoroB
>--Original Message--
>Hi,
>This is what we used, takes a bit of reading, and ignore
>the .net stuff but it works.
>http://support.microsoft.com/default.aspx?scid=KB;EN-
>US;Q194975&
>
>>--Original Message--
>>How can I insert a Word document into a image field in
>>SQL server 7 or 2000 via ASP?
>>Thanks
>>MoroB
>>.
>.
>|||They don't work with asp
>--Original Message--
>Check out the following links:
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnaskdr/html/askgui07312001.asp
>http://support.microsoft.com/default.aspx?scid=kb;EN-
US;q258038
>--
>HTH,
>SriSamp
>Please reply to the whole group only!
>"MoroB" <m.bonini@.abax.it> wrote in message
>news:09b001c3a2c2$7cfff450$a601280a@.phx.gbl...
>> How can I insert a Word document into a image field in
>> SQL server 7 or 2000 via ASP?
>> Thanks
>> MoroB
>
>.
>|||I've not personally tested them with ASP, but they work fine with VB. So
with just some modifications, they should work in ASP.
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
<anonymous@.discussions.microsoft.com> wrote in message
news:0f0501c3a2c7$7e670c20$a101280a@.phx.gbl...
> They don't work with asp
> >--Original Message--
> >Check out the following links:
> >http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/dnaskdr/html/askgui07312001.asp
> >http://support.microsoft.com/default.aspx?scid=kb;EN-
> US;q258038
> >
> >--
> >HTH,
> >SriSamp
> >Please reply to the whole group only!
> >
> >"MoroB" <m.bonini@.abax.it> wrote in message
> >news:09b001c3a2c2$7cfff450$a601280a@.phx.gbl...
> >> How can I insert a Word document into a image field in
> >> SQL server 7 or 2000 via ASP?
> >>
> >> Thanks
> >> MoroB
> >
> >
> >.
> >
Friday, February 24, 2012
Insert picture
easy. I was wondering if there is a simple way to insert an image into image
type field in SQL Server using Enterprise Manager (not programmatically)
Thank you
Al
Hi
No, EM does not support it. You need to use an application to do it.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"vul" <aaa@.optonline.net> wrote in message
news:%23skF6VWDGHA.3920@.tk2msftngp13.phx.gbl...
> Access allows to insert manually an image into OLE Object type field very
> easy. I was wondering if there is a simple way to insert an image into
> image
> type field in SQL Server using Enterprise Manager (not programmatically)
> Thank you
> Al
>
Sunday, February 19, 2012
Insert or update into a Image column causes data to double in size
one table to another in SQL Server.
When we do this what ever size of file we insert is doubled in size
when it is inserted into the destination table.
This happens in insert and update queries, and if we use DTS.
Any help would be greatly appreciatedskyhawker9 (andyh@.bmtdsl.co.uk) writes:
> We are experiencing problems inserting or updating image fields from
> one table to another in SQL Server.
> When we do this what ever size of file we insert is doubled in size
> when it is inserted into the destination table.
> This happens in insert and update queries, and if we use DTS.
> Any help would be greatly appreciated
I'm afraid that it's difficult to help, since you don't disclose very
many details. Could you provide the code you use to copy the fields?
What is the typical size of the data you copy?
What you mean by "file ... is doubled in size"? What file? The database
file? But then you talk about inserting the file? How do you know
that it doubles in size?
Sorry for asking so many questions, but while you know very well what is
going on at your site, I know next to nothing.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||We are storing documents such as PDFs, word documents etc in a object
field in a table. When we transfer the the contents from one table to
another using even a simple
INSERT INTO tblTest (ObjectField)
SELECT ObjectField
FROM tblTest2
The data in the destination is exactly doubled in size when you load
the document again ie when you save a 1Mb document into the table
transfer it to the second table it becomes 2Mb.
Hope this makes it more clear.|||skyhawker9 (andyh@.bmtdsl.co.uk) writes:
> We are storing documents such as PDFs, word documents etc in a object
> field in a table. When we transfer the the contents from one table to
> another using even a simple
> INSERT INTO tblTest (ObjectField)
> SELECT ObjectField
> FROM tblTest2
> The data in the destination is exactly doubled in size when you load
> the document again ie when you save a 1Mb document into the table
> transfer it to the second table it becomes 2Mb.
How do you deduce that?
It would help if you could provide a complete script that demonstrates
the problem. That would be a script that creates the table, populates
the first, and the loads the data into other, and then somehow gets
the size of the documents. I realise that including a 1MB object in
a script is not realistic, but the table pub..pub_info includes an
image column. Maybe you can build a repro script from that.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp