procedure TQQForm.OpenUpdateSql(sql: string);
var
FilePath:String;
begin
if ADOconnection.Connected =true then    //如果数据库是打开的,则先将其关闭
        ADOconnection.Connected :=false ;
FilePath:=Application.ExeName; //获取应用程序所在的全路径
FilePath:=ExtractFilePath(FilePath); //获取不含文件名的应用程序所在的路径
ADOconnection.ConnectionString :='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+FilePath+'\QQDb.mdf;Persist Security Info=False';
ADOconnection.Open;
ADOquery.Connection :=ADOconnection;
ADOquery.SQL.Clear;
ADOquery.SQL.Add(sql);
ADOquery.Open ;
end;