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 "objects" into SQL

Author  Topic 

Westerberg
Starting Member

18 Posts

Posted - 2006-05-08 : 09:20:44
Is it possible to insert a document or jpeg into a SQL database?

[edit] I see that you shouldn't store images, so I'm guessing you shouldn't store documents either?

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-05-08 : 09:40:43
Check out the IMAGE and TEXT datatypes.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-05-08 : 09:40:59
You can do it in an IMAGE datatype. You will have to decide it that is a good idea or not, based on the needs of your application.







CODO ERGO SUM
Go to Top of Page

Westerberg
Starting Member

18 Posts

Posted - 2006-05-08 : 10:20:22
Thank you very much.
Go to Top of Page

Westerberg
Starting Member

18 Posts

Posted - 2006-05-17 : 09:01:49
Can someone post some sample code for me? Or point me in the direction of a web site that does. Thanks.
Go to Top of Page

uberman
Posting Yak Master

159 Posts

Posted - 2006-05-17 : 09:08:16
http://www.google.co.uk/search?q=sql+server+jpeg+image+store
Go to Top of Page

Westerberg
Starting Member

18 Posts

Posted - 2006-05-17 : 11:15:16
I guess I should have been more specific. I'm looking for SQL statement (ie. Insert Into ImageDB (imagename) Values ('picture1') ) to insert a document or image into a database that can be used through ASP. I see where it can be done through SQL Server Utilites, TEXTCOPY but need it to be done through, as I said, ASP.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-05-17 : 12:05:22
"How To Access and Modify SQL Server BLOB Data by Using the ADO Stream Object"
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q258038

CODO ERGO SUM
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-18 : 02:21:52
http://www.aspfaq.com/show.asp?id=2149
http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part3/c1161.mspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -