procedure TForm1.Button1Click(Sender: TObject);
begin
q1.close;
(33)q1.SQL.Clear;
(34)q1.SQL.Text:='insert into MyImage(PicNum,PicContent) values(''11'',:MyPicture)';
(35)q1.Parameters.ParamByName('MyPicture').Loadfromfile('c:\100.jpg');
(36)q1.ExecSQL;
(37)end;
end.错误如下:
[Error] Unit1.pas(35): Not enough actual parameters
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
[Pascal Error] Unable to invoke Code Completion due to errors in source code
就是这个样子
begin
q1.close;
(33)q1.SQL.Clear;
(34)q1.SQL.Text:='insert into MyImage(PicNum,PicContent) values(''11'',:MyPicture)';
(35)q1.Parameters.ParamByName('MyPicture').Loadfromfile('c:\100.jpg');
(36)q1.ExecSQL;
(37)end;
end.错误如下:
[Error] Unit1.pas(35): Not enough actual parameters
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
[Pascal Error] Unable to invoke Code Completion due to errors in source code
就是这个样子
是loadfromfile的参数不足。
呵呵,我帮你查了半天 。给分!
:)TParameter.LoadFromFile 用法 procedure LoadFromFile(const FileName: String; DataType: TDataType);
你的参数不足是LoadFromFile引起的三少 :o)