Solved

Find image size of image data column in MSSQL

Posted on 2007-11-17
4
6,060 Views
Last Modified: 2012-08-13
I want to determine the size of the image I've uploaded into my MSSQL image data column. When I view the table in the SQL Server Enterprise Manager it only shows this: "<Binary>" and does not give any other information. I need to make sure my image script is actually uploading the image correctly, and I'm trying to do this by finding out the actual length in bytes of the image. Thank you in advance for any help.

Here's my @@version string:

Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005 23:18:38 Standard Edition NT 5.2 (Build 3790: Service Pack 2)
0
Comment
Question by:shady1024
  • 2
4 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 50 total points
ID: 20305447
please check out the DATALENGTH() function:
http://technet.microsoft.com/en-us/library/ms173486.aspx
0
 
LVL 31

Accepted Solution

by:
James Murrell earned 75 total points
ID: 20305473
SELECT DATALENGTH(image) FROM schematicsimage
0
 

Author Comment

by:shady1024
ID: 20314193
Thank you. I had seen an article that said use the data_length() function, which did not work. Now I see there's no underscore in the function name. Again, thank you very much for your prompt responses.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 20314907
Thanks happy to help
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question