能给讲一下 listview显示数据库内容的方法么?该如何解决

能给讲一下 listview显示数据库内容的方法么??
语句的步骤能写清楚最好!!!

------解决方案--------------------
这个还是参考listview的说明吧,代码太长了。
实际上工作如下:
1.给LISTVIEW 做 CLEAR。
2.执行 BEGINUPDATE
3. TRY保护
4.遍历记录集,每读一条记录,就增加一个LISTITEM,并NEXT记录集指针
5.finally
6.endupdate
7.end;//(try)
如此而已。如果记录比较多,可以在遍历过程中将鼠标指针变化成沙漏,遍历后恢复。而且每显示N条记录,释放一次CPU。用进度条显示遍历进度也是必要的,不要让用户认为死机。
------解决方案--------------------
给你段全套代码吧,能看懂多少看你造诣了。

const
Ci_Root = 0;
Ci_MovieGroup = 1;
Ci_ScenarioTypes = 2;
Ci_ScenarioType = 3;
Ci_Areas = 4;
Ci_Area = 5;
Ci_MediaDisk = 6;
Ci_MediaDiskI = 7;
Ci_MediaDiskO = 8;

Ci_MoiveManage = 9;
Ci_DataDictionary = 11;
Ci_Pushcart = 12; //

Ci_RemarkSubItemIndex = 7; // 列表视中备注的位置
IDS_NumberConnector = '. '; // 分割符号

function StrAlignment(const S: string; Fill: Byte; iLength: Integer; lrAlignment: TLeftRight): string;
var
iLen: Integer;
begin
Result := S;
iLen := iLength - Length(S);
if iLen <= 0 then Exit;
SetLength(Result, iLen);
Windows.FillMemory(PChar(Result), iLen, Fill);
case lrAlignment of
taLeftJustify:
Result := Result + S;
taRightJustify:
Result := S + Result;
else
Result := S;
end;
end;

function TfTemplate.AddListItem(const lv: TListView; const iImageIndex,
iStateIndex: Integer; const sCaption: WideString;
const sSubCaption: array of WideString): Boolean;
// 为列表视增加记录
var
i: Integer;
begin
with lv.Items.Add do
begin
ImageIndex := iImageIndex;
StateIndex := iStateIndex;
Caption := sCaption;
SubItems.NameValueSeparator := IDS_NumberConnector;
for i := Low(sSubCaption) to High(sSubCaption) do
SubItems.Add(sSubCaption[i]);
Indent := 0;
end;
Result := True;
end;

function TfBrowseTemplate.RefreshListViewItem(const tn: TTreeNode): Boolean;
// 根据树视节点类型,刷新列表
var
i: Integer;
tmpS: WideString;
tmpSArray: array of WideString;
tnGroup: TTreeNode;
ParentNodeType: TmhNodeType;
begin
ParentNodeType := self.GetNodeDataType(tn);
tnGroup := self.GetNodeGroupType(tn);
tmpS := ' ';

with ADODB.TADODataSet.Create(self) do
try
//初始化数据
Connection := ClsMovieHouse.AdoCn;
CursorLocation := clUseClient;
LockType := ltReadOnly;
CursorType := ctStatic;
CommandType := CmdText;

FCurrentListView.Items.BeginUpdate;
try
FCurrentListView.Items.Clear;
self.StatusBar1.Panels[1].Text := '共 0 项 ';
case ParentNodeType of
//------------------------------------
ntRoot: // 根
;
ntMovieGroup, ntScenarioTypes, ntAreas:
if tnGroup <> nil then
tmpS := Format( 'and M.MovieGroupID = %d ', [self.GetNodeDataID(tnGroup)]);
ntScenarioType:
if tnGroup <> nil then
tmpS := Format( 'and M.MovieGroupID = %d and M.ScenarioTypeID = %d ',
[self.GetNodeDataID(tnGroup), self.GetNodeDataID(tn)]);
ntArea:
tmpS := Format( 'and M.MovieGroupID = %d and M.AreaID = %d ',
[self.GetNodeDataID(tnGroup), self.GetNodeDataID(tn)]);
end;
CommandText :=
Format( 'Select M.*, MG.Readme, ST.Readme, Area.Readme, DT.Readme '