|
Re: storing a file content in DatabaseColumn [message #41202 is a reply to message #41191] |
Tue, 10 December 2002 01:13 |
Amitabha
Messages: 14 Registered: May 2002
|
Junior Member |
|
|
use LONG datatype in Table column and sroe file contents into that.
From SQL 2000 characters is your limit.
From PL/SQL you can insert strings of upto 32767 characters.
Above this you will need to go to something like Pro*C.
Try the following for the PL/SQl example
create table temp (x varchar2(10),y long);
/
CREATE OR REPLACE PROCEDURE inslong(a IN VARCHAR2,b IN VARCHAR2)
IS
BEGIN
INSERT INTO temp VALUES (a,b);
COMMIT
END inslong;
call inslong with parameters :
exec inslong('xyz',long_data_of_file);
for reading file contents you need pro 'c for binary files, utl_file for texts.
Amitabha.
|
|
|
|