先贴出代码吧:
procedure TFrmMain.Button2Click(Sender: TObject);
begin
if cxTextEdit1.text='' then exit ;
if not idftp1.Connected then idftp1.Connect;
adoquery1.Connection:=adoconnection1;
ADOQuery1.Close;
ADOQuery1.Open;
showmessage(ADOQuery1.SQL.Text);
ADOQuery1.SQL.Text:='select filename from test where shno='''+
cxTextEdit1.text+''''; Label1.caption:=adoquery1.FieldByName('filename').AsString ;
end;
我的目的是先实现通过cxTextEdit1.text输入一个单号,查出匹配的数据再输到一个lable上
但是这样写总是报错:“无效的授权说明”
请高手解答一下或者给其它的源代码也行!!谢谢
procedure TFrmMain.Button2Click(Sender: TObject);
begin
if cxTextEdit1.text='' then exit ;
if not idftp1.Connected then idftp1.Connect;
adoquery1.Connection:=adoconnection1;
ADOQuery1.Close;
ADOQuery1.Open;
showmessage(ADOQuery1.SQL.Text);
ADOQuery1.SQL.Text:='select filename from test where shno='''+
cxTextEdit1.text+''''; Label1.caption:=adoquery1.FieldByName('filename').AsString ;
end;
我的目的是先实现通过cxTextEdit1.text输入一个单号,查出匹配的数据再输到一个lable上
但是这样写总是报错:“无效的授权说明”
请高手解答一下或者给其它的源代码也行!!谢谢
procedure TFrmMain.Button2Click(Sender: TObject);
begin
if cxTextEdit1.text='' then exit ;
if not idftp1.Connected then idftp1.Connect;
if ADOConnection1.Connected then begin
adoquery1.Connection:=adoconnection1;
ADOQuery1.Close;
ADOQuery1.SQL.Text := 'select filename from test where shno= '+QuotedStr(cxTextEdit1.text);
showmessage(ADOQuery1.SQL.Text);
ADOQuery1.Open;
Label1.caption:=adoquery1.FieldByName('filename').AsString ;
end
else showmessage('ADOConnection1未连接。');
end;