代码很简单:
procedure ConnectToTable;
begin
Query1.Active:=False;
with Query1.SQL do begin
Clear;
Add(' order by id desc');
Add('Select ID,CONTENT from Receive ');
end;
Query1.Open;
end;
其中:Id 类型:int
Content 类型:Text
Query1的Dataset 与一DBGrid相连接
Database:SQLSERVER 6.5
Delphi 3.0
BDE 4.0