Solved

Find image size of image data column in MSSQL

Posted on 2007-11-17
4
6,053 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 142

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

777 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