Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I save a Memo to a Blob field?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to save a memo that is in the form to a database who have a field type blob called "help1". I'm using Interbase.
I created that using this SQL:
create table test(id integer, help1 blob sub_type -1);
Could you help me? Thanks:)
 
I really need some help to insert a memo into database.
Anyone could help me?
 
Is this as simple as setting up a TQuery component (call it qTestNew for instance) and set the SQL syntax to something like :
'INSERT INTO Test
(ID, help1)
VALUES
:)pID, :pHelp)'
where pID is a parameter of type integer and pHelp is of type BLOB (or Memo).
Then use the syntax :
with qTestNew do
begin
Params[0].AsInteger := tpID;
Params[1].AsMemo := Memo1.Text;
ExecSQL;
end;
(tpID is a temporary variable according to the entry to be made).
Does this help at all ?
Steve
 
I already try your sample program with a little changes. I need a help for this code:

SQLComm:= 'update MHS_AKAD_SUMMARY set CAT_KKNPKN = :)param1)where NIM = '9401356487'';

SQLQuery.SQL.Add(SQLComm);
SQLQuery.Params[0].AsMemo:= mmKKNPKN.text;
SQLQuery.ExecSQL;

with memo contents:
|------------------|
| Place: |
| Time: |
| Group: |
|------------------|

SQLComm is in string.

When I try to reload from the database to get the new memo data, I get this:

Place: Time: Group:

in my memo control.

Thank you before, for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top