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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert and read(view) interbase blob fields

Status
Not open for further replies.

cheikh1

Programmer
Feb 19, 2003
75
MR
hello,
i'm developing a database program using delphi5 and interbase6.
my first question is:i have field of type blob
this field objective is to save a list of names(strings)
the user type the names into a TMEMO control but
but i need to know how can i insert this data into the table(can use stored procedures)and how can i retrieve it.
code example may better.
the second question is is a delphi5 professional with interbase6 capable of running this multiuser program(remote database server).
thank you.
 
Use a UpdateSql component use:
with UpdateSql1 do
begin
Sql[ukInsert]:='insert into yourtable(blobfieldname) values :)p1)';
Params[0].ASBlob:=Memo1.Text;
try
Query[ukInsert].ExecSQL;
except
ShowMessage('Unable to save blob field');
end;
end;

Dont forget to put a Query pointing to the database where you want to do the insert and in the UpdateObject property put the UpdateSQL`s name.

Hope It Helps


Camilo Sànchez
 
And for read it you can use:

Query1.FieldByName('BlobField').AsText;

Hope it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top