function rGetSeqNo(seqname:string): real;
var
QComm: TQuery;
begin
QComm := TQuery.Create(Application);
with QComm do
try
DataBaseName := 'Manager';
Sql.Clear;
Sql.Add('Select '+seqname+'.NextVal Seq_No from dual');
prepare;
open;
Result := FieldByName('Seq_No').asFloat;
finally
free;
end;
end;
//DataBaseName 为你连接数据库的DATABASE名称。