代码如下:
   query3.Close;
   query3.SQL.Clear;
   query3.SQL.Add('select sendtime,fromname,msg from smsg where (read1=1) and   (sendto='''+ 'F2'')');
   showmessage(Query3.SQL.Text);
   query3.Open;
   showmessage(inttostr(query3.RecordCount));  //总是显示为-1
执行select sendtime,fromname,msg from smsg where (read1=1) and   (sendto= 'F2') 得到12条结果
请热心人帮助!!