--- title: "length Method (SQLServerBlob) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerBlob.length" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: aa233ccb-72d3-4ea3-979d-07ef9aa47359 author: David-Engel ms.author: v-daenge --- # length Method (SQLServerBlob) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Returns the number of bytes in the BLOB object. ## Syntax ``` public long length() ``` ## Return Value A **long** value that specifies the number of bytes. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This length method is specified by the length method in the java.sql.Blob interface. ## See Also [SQLServerBlob Methods](../../../connect/jdbc/reference/sqlserverblob-methods.md) [SQLServerBlob Members](../../../connect/jdbc/reference/sqlserverblob-members.md) [SQLServerBlob Class](../../../connect/jdbc/reference/sqlserverblob-class.md)