query1.text:=
'declare @r int'+char(13)+Char(10)+
'select 字段1,字段2,字段n from tablename where user='''abc''''+char(13)+Char(10)+
'set @r=@@rowcount'+char(13)+Char(10)+
'select @r as recordcount,字段1,字段2,字段n from tablename where user='''abc''''
query1.open;