Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

If you are doing this from an application (VB.Net or C++ or php or whatever), then you must load the data in chunks, if the data is larger than 4000 bytes (thanks, mustaccio) OR if the data contains values that can't be sent as a string (Binary data).

The process is to take your data, split it into an array of byte "chunks" that are each somewhere less than 4000 bytes per chunk. The examples below provide ways to do this in a few languages.

Here is a PHP example from Oracle for using byte chunks.

Here is a C++ exampleHere is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

If you are doing this from an application (VB.Net or C++ or php or whatever), then you must load the data in chunks, if the data is larger than 4000 bytes (thanks, mustaccio) OR if the data contains values that can't be sent as a string (Binary data).

The process is to take your data, split it into an array of byte "chunks" that are each somewhere less than 4000 bytes per chunk. The examples below provide ways to do this in a few languages.

Here is a PHP example from Oracle for using byte chunks.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

If you are doing this from an application (VB.Net or C++ or php or whatever), then you must load the data in chunks, if the data is larger than 4000 bytes (thanks, mustaccio) OR if the data contains values that can't be sent as a string (Binary data).

The process is to take your data, split it into an array of byte "chunks" that are each somewhere less than 4000 bytes per chunk. The examples below provide ways to do this in a few languages.

Here is a PHP example from Oracle for using byte chunks.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

added 360 characters in body
Source Link
CaM
  • 2.2k
  • 11
  • 21

If you are doing this from an application (VB.Net or C++ or php or whatever), then you must load the data in chunks, if the data is larger than 4000 bytes (thanks, mustaccio) OR if the data contains values that can't be sent as a string (Binary data).

The process is to take your data, split it into an array of byte "chunks" that are each somewhere less than 4000 bytes per chunk. The examples below provide ways to do this in a few languages.

Here is a PHP example from Oracle for using byte chunks.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

If you are doing this from an application (VB.Net or C++ or php or whatever), then you load the data in chunks.

Here is a PHP example from Oracle.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

If you are doing this from an application (VB.Net or C++ or php or whatever), then you must load the data in chunks, if the data is larger than 4000 bytes (thanks, mustaccio) OR if the data contains values that can't be sent as a string (Binary data).

The process is to take your data, split it into an array of byte "chunks" that are each somewhere less than 4000 bytes per chunk. The examples below provide ways to do this in a few languages.

Here is a PHP example from Oracle for using byte chunks.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.

Source Link
CaM
  • 2.2k
  • 11
  • 21

If you are doing this from an application (VB.Net or C++ or php or whatever), then you load the data in chunks.

Here is a PHP example from Oracle.

Here is a C++ example from Stack Overflow.

Here is a C#.Net example from Code Project.

If you're doing this from scripts, check out SQL*Loader.

LOAD DATA 
INFILE example13.dat 
INTO TABLE EXAMPLE13 
FIELDS TERMINATED BY ',' 
( EMPNO INTEGER EXTERNAL, 
ENAME CHAR, 
JOB CHAR, 
MGR INTEGER EXTERNAL, 
SAL DECIMAL EXTERNAL, 
COMM DECIMAL EXTERNAL, 
DEPTNO INTEGER EXTERNAL, 
RES_FILE FILLER CHAR(60), 
"IMAGE" BFILE(CONSTANT "ORDIMGDIR", RES_FILE) 
)

If one of these examples isn't the right programming language or doesn't help you, let me know and I'll try to find you one for that language.