都一样啊procedure TForm1.ListView1Click(Sender: TObject);
var
de:string;
begin
if listview1.Selected = nil then exit; //这里,,啦 de:=listview1.Selected.Caption;
adotable3.Open;
adotable3.First;
while not adotable3.Eof do
begin
if de=adotable3.FieldValues['书名'] then
exit
else adotable3.Next;
end;
end;
var
de:string;
begin
if listview1.Selected = nil then exit; //这里,,啦 de:=listview1.Selected.Caption;
adotable3.Open;
adotable3.First;
while not adotable3.Eof do
begin
if de=adotable3.FieldValues['书名'] then
exit
else adotable3.Next;
end;
end;
参考一下delphi的demo吧
if adoquery1.active then adoquery1.close;
adoquery1.connectionstring := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + '' + GetCurrentDir() + '' + '\'+'sj\datebase.mdb;JET OLEDB:Database password = 8YLA1-2CSFK-FHQKHNZH';
adoquery1.sql.text := 'select * from datebase';
adoquery1.open;
我用的是adoquery1
if adoquery1.active then adoquery1.close;
adoquery1.connectionstring := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + '' + GetCurrentDir() + '' + '\'+'sj\datebase.mdb;JET OLEDB:Database password = 8YLA1-2CSFK-FHQKHNZH';
adoquery1.sql.text := 'select * from datebase';
adoquery1.open;
adoquery1.open以后怎么办?
怎么看到现实的东西?