Home > Back-end >  Delphi moderation ODAC query to all records of blob field assignment why wrong
Delphi moderation ODAC query to all records of blob field assignment why wrong

Time:09-18

Procedure TForm1. Button1Click (Sender: TObject);
The begin
OraSession1. Server:='192.168.48.115:1521: ORAGS6';
OraSession1. LoginPrompt:=true;
OraSession1. Username:='system';
OraSession1. Password:='orags6';
OraSession1. Options. Direct:=True;
OraSession1.Options.Net:=true;
OraSession1. ConnectPrompt:=false;
OraSession1. Connect;

OraQuery1. Session:=OraSession1;
OraQuery1. SQL. The Add (' select * from alex ');

OraQuery1. Open;
OraDataSource1. The DataSet:=OraQuery1;
While not OraDataSource1. DataSet. Eof do
The begin
OraDataSource1. DataSet. Edit;
TBlobField (OraDataSource1. DataSet. Fields [2]). The LoadFromFile (' temp. Zipx ');
OraDataSource1. DataSet. Post;
OraDataSource1. DataSet. Next;
end;
end;

End.

CodePudding user response:

Blob store files in the field, is not a good way, it is best to store file path,
  • Related