Delphi ADO sql statement for inserting a CLOB into Oracle 8/9

I have an application that needs to insert a record into a table which includes a CLOB field.  I've seen comments about dbms_log and about empty_clob(), but would really appreciate someone who's done this to put together a couple of sql statements that I can execute to get the job done.

I have a TMemo control on screen (not data bound) and I need to pass the text over and get it inserted into the table.  What I've tried so far is

ADOCmd.SQL := 'Insert into Memos (Recno, Notes) values (1234, ' + moDescrip.Text + ')';
ADOCmd.Execute;

For someone who's done this before, this should be quick and easy points.  :-)
Thanks.
bjones8888PresidentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bjones8888PresidentAuthor Commented:
Oops.  Forgot to mention.  It seems to work ok with small amounts of text (< 254 characters).  As soon as I go to larger amounts of text, I get an access violation.  It's wrapped pretty deeply so I'm not sure what the actual error message is that it generates.
0
DragonSlayerCommented:
Would it help if you use parameters instead?

with ADOCmd do
begin
  CommandText := 'INSERT INTO Memos (RecNo, Notes) VALUES (:RecNo, :Notes)';
  Parameters.ParamValues['RecNo'] := 1234;
  Parameters.ParamValues['Notes'] := moDescript.Text;
  Execute;
end;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vaceroseCommented:
When dealing with large data I have had success using a parameterized query and streams.

ms:=TMemoryStream.Create;
moDescrip.Lines.SaveToStream(ms);
ms.Position:=0;
ADOCmd.SQL := 'Insert into Memos (Recno, Notes) values (1234, :pNotes)';
ADOCmd.Prepared:=true;
ADOCmd.Parameters.ParamByName('pNotes').LoadFromStream(ms);
ADOCmd.Execute;
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.