Re: JPG in Database

From: Adrie Noordhuis <>
Date: Tue, 11 May 1999 09:55:18 +0200
Message-ID: <>

Roland, I hope this wil help.

Abstract:           This tutorial explains how to load binary files
                    into a raw field using SQL*Loader
                    SQLLDR72, SQLLDR73, VAR, PROCESSING, OPTION

            NT/95 Loading Text Files with SQL*Loader

To load a binary file with SQL*Loader you must first create a table with a raw column to contain the binary file. You must then create a SQL*Loader control file which uses the 'fix' file processing option for SQL*Loader. The file will then be ready to load with SQL*Loader from the command line. You will not be able to view the data in a raw column with basic SQL interpreters. You can view images with Oracle Forms.

Steps to load binary files into a raw field. 1. Create your table with a raw field.

SQLWKS>create table ImageTable (FileName varchar(30), BinaryFile long raw); Statement processed.
SQLWKS> desc imagetable

Column Name                    Null?    Type
------------------------------ -------- ----
FILENAME                                VARCHAR2(30)
BINARYFILE                              LONG RAW

2. Create your control file using the 'FIX' file processing option. Note: The 'FIX' size is the size of the binary file. This processing option is mentioned in the Oracle7 Server Getting Started manual for Windows NT

load data
infile data.dat "fix12350"
into table ImageTable
(fileName constant 'DATA.DAT',
BinaryFile raw (12350))

3. Run SQL*Loader to insert data.
C:\TEMP> SQLLDR73 SCOTT/TIGER CONTROL=CONTROL.CTL SQL*Loader : Release - Production on Mon May 26 14:39:13 1997 Copyright (c) Oracle Corporation 1979, 1996. All rights reserved Commit point reached - logical record count 1

Adrie Noordhuis

Roland Daane <> wrote in message news:c9HZ2.8207$pi1.3005_at_amsnews...
> Hi..
> Can anyone help on a method to get my JPG files into the database?
> thanks Roland Daane
Received on Tue May 11 1999 - 09:55:18 CEST

Original text of this message