We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

How i can store blob field in oracle10g

elmmahdi
elmmahdi asked
on
Medium Priority
656 Views
Last Modified: 2012-06-21
frist of all i ma not well speakinging english.
my problem is :
how i can store file with size for example 10mb or more in blob field or clob field
i am useing oracle10g ang delphi7
my table name is ingshow
fields are :
imgname varchar2(30)
sora blob
i want to store file with size 10 mb in field sora and how i can displyon delphi form
and when i run the program i recieve this error:0x77492b2f write of address0x00030ffc

acess violation at
plz help me
thxxxxxxxxxx alot

procedure TForm1.BitBtn1Click(Sender: TObject);
Var
FileStream : TFileStream ;
buffer : String;
FileSize : integer;
begin
FileStream := TFileStream.Create('d:\set.txt',fmOpenReadwrite) ;
FileSize := (FileStream.size );
Setlength(Buffer,FileSize);
FileStream.read(pointer(Buffer)^,FileSize);
memo1.text := Buffer;
 with query1 do
  begin
  close;
  sql.Clear;
  sql.Add('insert into imgshow values('+quotedstr(edit1.Text)+',');
  sql.Add(''+quotedstr(memo1.Lines.Text)+')');
  execsql;
 end;
FileStream.Free ;
end;

Open in new window

blobproblem.jpg
Comment
Watch Question

try
say in your oracle database you have IMAGE coloum with BLOB data type and MEMO varchar(50)
then do this
 sql.add(insert into imgshow (IMAGE,MEMO) values(EMPTY_BLOB()),:Memo);
 sql.add(returning IMAGE into :image);
 sql.ParamByName('image').AsParamType := ptInput;
 sql.ParamByName('image').AsBlobLocator.Asstring := quotedstr(edit1.Text);
 sql.ParamByName('Memo').AsString := quotedstr(memo1.Lines.Text);
 execsql;

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.