Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Data types : Support for OpenEdge ABL BLOB data type
 

Support for OpenEdge ABL BLOB data type

The DataServer provides support for the OpenEdge ABL BLOB (Binary Large Object) data type by mapping to equivalent data types in the MS SQL Server. This support is limited to MS SQL Server 2005 and later versions. The ability to map to an OpenEdge BLOB data type enables you to:
*Migrate to an OpenEdge database with BLOB data types to an MS SQL Server database as VARBINARY(MAX) and to pull the server types back as a BLOB date types into the schema holder. For more information on enabling the BLOB data type during a schema migration, see Migrating an OpenEdge database to MS SQL Server.
*Pull MS SQL Server VARBINARY(MAX), IMAGE, or VARBINARY(MAX) FILESTREAM as OpenEdge BLOB data type into the schema holder by using the Default to OpenEdge LOB option.
*Read and write data to and from an MS SQL Server database that is BLOB-enabled by using ABL ASSIGN and COPY-LOB operations.
*Pass a BLOB as an INPUT or an OUTPUT parameter to the stored procedure. You can use the OpenEdge MEMPTR and LONGCHAR data types as parameters to RUN STORED-PROCEDURE to map BLOB and CLOB server types, respectively. For more information on RDBMS Stored Procedure Details, see Chapter 1, RDBMS Stored Procedure Details on page 1.
Note: Do not refer to RUN STORED-PROCEDURE as an RDBMS transaction. It is a part of a transaction but is not in itself inherently a transaction. The ability to pass LOB parameters does not give you the ability to run stored procedures.
Note: MS SQL provides partial read/write capability to BLOB and CLOB data types using STARTING AT, FOR, and OVERLAY AT n [TRIM] operations. This capability does not extend to the SQL server legacy native data type, IMAGE.
When the Default to OpenEdge LOB for: BLOBs is selected in Pre-Selection Criteria of the schema pull (see Independent OpenEdge MS SQL Server Schema Pull), it breaks the backward compatibility of the MS SQL Server DataServer which previously mapped server LOB types to the OpenEdge CHARACTER data type. Since the Adjust Schema operation also expects CHARACTER type mapping for server LOB types, an Adjust Schema operation fails to "adjust", those server LOBs that are now mapped to BLOBs, back to RAW mappings. Since this schema adjustment will not occur, server BLOBs will now be mapped to OpenEdge BLOBs and will be useable as LOB objects in your OpenEdge DataServer application. LOB objects are manipulated differently from the original RAW data types and the requirements for your BLOB-mapped application may be different from your original database if such server LOBs were originally migrated from RAW data types.
For more information, on using the ASSIGN and COPY-LOB statements, see OpenEdge Development: ABL Reference.
* ABL-to-MS SQL Server data type mapping