伤脑筋.listView只每条显示数据库20字节的内容.解决方案
伤脑筋.listView只每条显示数据库20字节的内容....
请教一下......我使用listView读取数据库的时候.字段中的每条数据只能显示20字节的内容...不知道是怎么回事呢....
我的代码是这样的///
var
tmpItem: TListItem;
begin
countITG := 0 ;
ListView1.Items.Clear;
with adoquery1 do
begin
close;
sql.Clear;
sql.Add( 'select site_N,U_name,U_pass,statu from siteInfo');
Open;
while not Eof do
begin
inc(countITG);
ADOQuery1.Active := True;
tmpItem := ListView1.Items.Add;
tmpItem.Caption := intToStr(countITG);
tmpItem.SubItems.Add(FieldByName('site_N').Value);
next;
end;
end;
end;
------解决方案--------------------
是不是你字段中只能保存20个字节长度,那样读出来也就20个字节
------解决方案--------------------
代码无误 检查设置
------解决方案--------------------
代码没有问题,检查一下是否把字段设置长度为20了。
请教一下......我使用listView读取数据库的时候.字段中的每条数据只能显示20字节的内容...不知道是怎么回事呢....
我的代码是这样的///
var
tmpItem: TListItem;
begin
countITG := 0 ;
ListView1.Items.Clear;
with adoquery1 do
begin
close;
sql.Clear;
sql.Add( 'select site_N,U_name,U_pass,statu from siteInfo');
Open;
while not Eof do
begin
inc(countITG);
ADOQuery1.Active := True;
tmpItem := ListView1.Items.Add;
tmpItem.Caption := intToStr(countITG);
tmpItem.SubItems.Add(FieldByName('site_N').Value);
next;
end;
end;
end;
------解决方案--------------------
是不是你字段中只能保存20个字节长度,那样读出来也就20个字节
------解决方案--------------------
代码无误 检查设置
------解决方案--------------------
代码没有问题,检查一下是否把字段设置长度为20了。