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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Image storing

Author  Topic 

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-08-22 : 07:45:54
Hi guyz,

I want store the image in a database.
Now i'm using image datatype for a field and i stored
the image in that field also.
But the image is not fully stored in the database.
If i retrive the image means i can able to retrive only 4000 bytes.

Scenario:

Before storing the Image size : 28430 bytes

If i store the image in a database
and if i retrived the image means the size is:4000 bytes

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-29 : 09:34:44
Then you haven't fully used IMAGE datatype.
I think you used VARBINARY(4000).

To be able to help you further we need to see your code.
This is not a database issue.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-08-29 : 09:53:04
Hi peso,

You r correct,
Thats a front end issue,they hav restricted the
image level upto 4000 bytes.
Thanks for spending u'r time.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-29 : 09:54:31
Thank you for the feedback.
Good luck!



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-08-29 : 17:39:52
Why store your image in the db. Read up on BLOB

why not store it in a folder and create a link in the db to the image location ?

Lots on examples in this forum and online
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2008-08-29 : 18:47:06
In re: Why store your image in the db?

Dangling references.

=======================================
It is impossible to imagine Goethe or Beethoven being good at billiards or golf. -H.L. Mencken, writer, editor, and critic (1880-1956)
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-08-29 : 19:10:51
note for the future:

use FILESTREAM in 2008 for best of both worlds


elsasoft.org
Go to Top of Page
   

- Advertisement -