Showing posts with label stores. Show all posts
Showing posts with label stores. Show all posts

Monday, March 26, 2012

Images

I want to create a catalogue such thing with stores items in a shop, some with pictures. How do I store images in sql server 2000?
Thank YouPainfully...just store the path to the image...

Look up READTEXT, WRITETEXT in bol if your still interested...|||sort the threads on this forum .. its the tenth largest thread..
but please read it completely to get the idea to store images in SQL server|||how do you sort the threads??|||Click on the word reply...

http://www.dbforums.com/t203835.html|||are u sure u gav me the correct link...|||Originally posted by asbirpam
I want to create a catalogue such thing with stores items in a shop, some with pictures. How do I store images in sql server 2000?

Thank You

You can create a field in your table with the type of image. you can then save the image in the table.|||Check the thread http://www.dbforums.com/t203835.html referred by Brett which is updated.|||http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx is a really comprehensive article on that topic

Image size

I have a SQL database that stores image files (pdf, doc, tif etc). Is it
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:
>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si

Image size

I have a SQL database that stores image files (pdf, doc, tif etc). Is it
possible to write a query that shows the size of the file being stored ?
Any help would be great.
Thanks
SiYou can get the bytes used with DATALENGTH -
SELECT DATALENGTH(YourImageColumn)
FROM YourTable
You can find more information on DATALENGTH in Books Online.
-Sue
On Mon, 31 Jul 2006 08:36:01 -0700, Simon
<Simon@.discussions.microsoft.com> wrote:

>I have a SQL database that stores image files (pdf, doc, tif etc). Is it
>possible to write a query that shows the size of the file being stored ?
>Any help would be great.
>Thanks
>Si

Monday, March 19, 2012

Image Column Data and Backup

I have a table (SQL Server 2000) that stores icon files in an Image
field. I have no problem storing and retrieving the images on my system.
When I back up the database however the rows in that table do not seem
to get backed up. In other words when I restore the database on another
server there are no rows in that one table.
I have used the sp_tableoption to turn "in row text" on for the table
etc. Anyone have a clue what I might be doing wrong? This table will
eventually need to be recreated at a customer site with the data intact
and I was planning on just backing the database up and then restoring it.
Bob PorterA restored database will be exactly like the original, less uncommitted
transactions. A common cause of the problem you describe is that multiple
backups exist in the same backup file and the first (oldest) is restored by
default. You can list the backup file contents with RESTORE HEADERONLY:
RESTORE HEADERONLY
FROM DISK='C:\Backups\MyDatbase.bak'
You can then specify the desired backup with the FILE specification:
RESTORE DATABASE MyDatabase
FROM DISK='C:\Backups\MyDatbase.bak'
FILE=2
Hope this helps.
Dan Guzman
SQL Server MVP
"Robert Porter" <rhysliam@.noemail.nospam> wrote in message
news:ud2nToCbFHA.2128@.TK2MSFTNGP15.phx.gbl...
>I have a table (SQL Server 2000) that stores icon files in an Image field.
>I have no problem storing and retrieving the images on my system. When I
>back up the database however the rows in that table do not seem to get
>backed up. In other words when I restore the database on another server
>there are no rows in that one table.
> I have used the sp_tableoption to turn "in row text" on for the table etc.
> Anyone have a clue what I might be doing wrong? This table will eventually
> need to be recreated at a customer site with the data intact and I was
> planning on just backing the database up and then restoring it.
> Bob Porter|||Dan Guzman wrote:
> A restored database will be exactly like the original, less uncommitted
> transactions. A common cause of the problem you describe is that multiple
> backups exist in the same backup file and the first (oldest) is restored b
y
> default. You can list the backup file contents with RESTORE HEADERONLY:
> RESTORE HEADERONLY
> FROM DISK='C:\Backups\MyDatbase.bak'
> You can then specify the desired backup with the FILE specification:
> RESTORE DATABASE MyDatabase
> FROM DISK='C:\Backups\MyDatbase.bak'
> FILE=2
>
It did! Thanks, sorry for the newbie question I knew better... sigh...|||No problem. You're certainly not the first to run into this :-)
Hope this helps.
Dan Guzman
SQL Server MVP
"Robert Porter" <rhysliam@.noemail.nospam> wrote in message
news:%23J0MYlDbFHA.464@.TK2MSFTNGP15.phx.gbl...
> Dan Guzman wrote:
> It did! Thanks, sorry for the newbie question I knew better... sigh...