SAP Knowledge Base Article - Preview

2304955 - SAP IQ - how to use the BFILE() function to extract large object data to an external file


  • Customers wanting to extract LONG BINARY and LONG VARCHAR cells (greater than 32676 characters) to individual operating system files, either within a procedure or via a standalone SQL statement,  either taking data from a variable or a table column.
  • trying to use the IQ Data Extraction facility through the use of option Temp_Extract_Name1 for example may run into this error
Could not execute statement.
You must use BFILE() to extract long varchar column.
(dflib\dfo_Root.cxx 2852)
SQLCODE=-1001057, ODBC 3 State="HY000"
Line 7, column 1
  • incorrect use of the BFILE function may result in either of the following errors
Could not execute statement.
Wrong number of parameters to function 'BFILE'
SQLCODE=-154, ODBC 3 State="42000"
Line 1, column 1
Could not execute statement.
Feature 'bfile' not implemented
SQLCODE=-134, ODBC 3 State="HY000"
Line 1, column 1
Could not execute statement.
Function not supported on varchars longer than 32767 Length of Bind host
variable exceeds MaxLength ,
-- (dflib\df_Heap.cxx 3181)
SQLCODE=-1001019, ODBC 3 State="HY000"
Line 2, column 1



SAP IQ versions 15.x and 16.x


SAP IQ 16.0


LOB, Sybase, IQ 16, IQ 15, export, proc, failure, error, implemented, local file, data type, datatype, binary, temp table, temptab , KBA , BC-SYB-IQ , Sybase IQ , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.