[Error] Unit1.pas(36): Undeclared identifier: 'TstringGrid1'
//'TstringGrid1'没有定义(你name写错了)
[Error] Unit1.pas(36): Missing operator or semicolon
//类型匹配不对
[Error] Unit1.pas(36): Undeclared identifier: 'count'
//count没有定义
[Error] Unit1.pas(37): Missing operator or semicolon
//类型匹配不对
[Error] Unit1.pas(38): Undeclared identifier: 'j'
//j没有定义
[Error] Unit1.pas(41): Undeclared identifier: 'i'
//i没有定义
[Error] Unit1.pas(41): 'DO' expected but identifier 'ColCount' found
[Error] Unit1.pas(43): Missing operator or semicolon
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas' while not ADoQuery1 .eof do
begin
for i := 0 to TstringGrid1.ColCount-1 do
begin
TstringGrid1.Cells[i,j] :=ADoQuery1 .Fields[i].asstring;
inc(J);
ADoQuery1.next;
end;
end;
end;
/*********************************/
/*1、在CSDN上坚决反对灌水倒分 */
/*2、在看球赛时坚决支持中国队对手*/
/*4、在国际纠纷上坚决支持中国 */
/*********************************/
//'TstringGrid1'没有定义(你name写错了)
[Error] Unit1.pas(36): Missing operator or semicolon
//类型匹配不对
[Error] Unit1.pas(36): Undeclared identifier: 'count'
//count没有定义
[Error] Unit1.pas(37): Missing operator or semicolon
//类型匹配不对
[Error] Unit1.pas(38): Undeclared identifier: 'j'
//j没有定义
[Error] Unit1.pas(41): Undeclared identifier: 'i'
//i没有定义
[Error] Unit1.pas(41): 'DO' expected but identifier 'ColCount' found
[Error] Unit1.pas(43): Missing operator or semicolon
[Fatal Error] Project2.dpr(5): Could not compile used unit 'Unit1.pas' while not ADoQuery1 .eof do
begin
for i := 0 to TstringGrid1.ColCount-1 do
begin
TstringGrid1.Cells[i,j] :=ADoQuery1 .Fields[i].asstring;
inc(J);
ADoQuery1.next;
end;
end;
end;
/*********************************/
/*1、在CSDN上坚决反对灌水倒分 */
/*2、在看球赛时坚决支持中国队对手*/
/*4、在国际纠纷上坚决支持中国 */
/*********************************/
解决方案 »
- 我按照李维的Web电子商务应用的书上做了一个ISAPI的例子不能运行
- 请教一个MSSQL存储过程的写法,简单的,我没用过存储过程,想用,在线等待
- 求救,用SQL查找出在二个日期之间的所有数据。
- 在深圳,有边防证就可以了吗?!还得办暂住证吗!
- 这几天想辞职,公司已经3各月没发工资了,而且也是没有活,还押我们%%%薪水。。。。。。
- sql语句如何写:如何删除一个表中的从复记录,只留一条记录,
- 求助:定时器 SetTimer...
- 我有一delphi函数,需要调用两个外部函数(vb所写),但运行到da:= h*16 +l时总是得不到想要的值既DA值。请各位检查一下,问题出在哪里?谢谢!
- 如何动态控制stringgrid的行数,以及如何得到鼠标点击的行号
- 使用过delphi+Acess的高手请进,只要能解决问题全部分数送上!
- delphi中能使用游标和临时表吗
- 急,怎样在程序里改变系统分辨率。
var
I, J: Integer;
begin
with ADoQuery1 do
begin
Close;
SQL.Clear;
SQL.Add('Select * from nan_one');
Open;
StringGrid1.RowCount := ADoQuery1.RecordCount;
StringGrid1.ColCount := ADoQuery1.Fields.Count;
J := 0;
while not Eof do begin
for I := 0 to StringGrid1.ColCount - 1 do
StringGrid1.Cells[I, J] := Fields[I].AsString;
Inc(J);
ADoQuery1.Next;
end;
end;
end;