Re: Question on RAW LONG datatype

From: Paparao S. Avasarala <spaparao_at_eng.auburn.edu>
Date: 1995/05/27
Message-ID: <D98zw9.IDG_at_mail.auburn.edu>#1/1


In article <3q21u9$q9b_at_asterix.uninova.pt>, ppf_at_uninova.pt (Pedro Pimentel) writes:
>In article <3pl0hv$gdq_at_news.cis.nctu.edu.tw>, vinay@wslvax1.wipsys.soft.net says...
>>
>>Hi,
>>
>>I have a requirment of storing a binary file in Oracle 7 database.
>>I created a table with a field of type RAW LONG. But I have no idea
>>of how to store the binary file to this table. Can any one help.
>>
>>1. How to load a binary file to a RAW LONG column.
>>2. How to retrive that from the table.
>>
>>Any help will be greatly appreciated.
>
> It's a LONG RAW type.
>
> You'll have to use Pro*C or ODBC in Windows to load anything into
>it. You can retrieve data from it also with Pro*C or with the ODBC
>SDK on Windows (the PC must be connected to Oracle with SQL*Net on
>top of TCP/IP and using some ODBC DLL for Oracle).
>
> If you're using a Windows based interface, you can try using
>Access that will use those LONG RAW fields to store and retrieve
>OLEs.
>
> If you need more help, feel free to contact me.
>
>--
>Pedro Pimentel
>Faculdade de Ciencias e Tecnologia / Universidade Nova de Lisboa - Portugal
> e-mail: ppf_at_uninova.pt
> www: http://terra.uninova.pt/pedro/pedro1.html
>Benfica Home Page: http://terra.uninova.pt/pedro/slb/slbindex.html
>

For Ques 2:
To retrieve the file from the LONG RAW column:

  • Use Pro*C, just like you inserted the file
  • Use some ODBC from MS Windows (I once used Powerbuilder), to open a file and read the contents of the column to the file. The ODBC I used supported a SELECT BLOB ... command.

Hope this helps.

--Rao Received on Sat May 27 1995 - 00:00:00 CEST

Original text of this message