你数据操作的函数 execute sql 感觉比较不好我替你写了一个overload函数 function BExecSQL(SqlStr: string; Params: array of Variant): boolean;overload; …… function Tsomain.BExecSQL(SqlStr: string; Params: array of Variant): boolean; var i,j:integer; begin //返回布尔值的execsql DBtoken.Enter; j := length(Params) ; with adolink do begin Close; SQL.Clear; SQL.Text:=SqlStr; for i:= 0 to j-1 do begin Parameters[i].Value := Params[i]; end; try ExecSQL; result:=true; except result:=false; end; SQL.Clear; Close; end; DBtoken.Leave;