编写打印时出现的问题,急! ( 积分: 30 )

  • 主题发起人 主题发起人 hyzb
  • 开始时间 开始时间
H

hyzb

Unregistered / Unconfirmed
GUEST, unregistred user!
for i := 1 to Data.ADOQMBooks.RecordCountdo
begin
Printer.Canvas.TextOut(200,500+i*80,
+Data.ADOQMBooks.FieldByName('BookID').AsString+' ' 报错行
+Data.ADOQMBooks.FieldByName('ISBN').AsString+' '
+Data.ADOQMBooks.FieldByName('BookName').AsString+' '
+Data.ADOQMBooks.FieldByName('BookType').AsString+' '
+Data.ADOQMBooks.FieldByName('BookAuthor').AsString+' '
+Data.ADOQMBooks.FieldByName('PublishName').AsString+' '
+Data.ADOQMBooks.FieldByName('PublishDate').AsString+' '
+Data.ADOQMBooks.FieldByName('PageCount').AsString+' '
+Data.ADOQMBooks.FieldByName('Keyword').AsString+' '
+Data.ADOQMBooks.FieldByName('RegisterDate').AsString+' '
+Data.ADOQMBooks.FieldByName('StockCount').AsString+' '
+Data.ADOQMBooks.FieldByName('Memo').AsString);
Data.ADOQMBooks.Next;
end;
运行时代码的+Data.ADOQMBooks.FieldByName('BookID').AsString+' '这一行报错,错误提示为Operator not applicable to this operand type,有谁知道这是怎么回事嘛?
 
for i := 1 to Data.ADOQMBooks.RecordCountdo
begin
Printer.Canvas.TextOut(200,500+i*80,
+Data.ADOQMBooks.FieldByName('BookID').AsString+' ' 报错行
+Data.ADOQMBooks.FieldByName('ISBN').AsString+' '
+Data.ADOQMBooks.FieldByName('BookName').AsString+' '
+Data.ADOQMBooks.FieldByName('BookType').AsString+' '
+Data.ADOQMBooks.FieldByName('BookAuthor').AsString+' '
+Data.ADOQMBooks.FieldByName('PublishName').AsString+' '
+Data.ADOQMBooks.FieldByName('PublishDate').AsString+' '
+Data.ADOQMBooks.FieldByName('PageCount').AsString+' '
+Data.ADOQMBooks.FieldByName('Keyword').AsString+' '
+Data.ADOQMBooks.FieldByName('RegisterDate').AsString+' '
+Data.ADOQMBooks.FieldByName('StockCount').AsString+' '
+Data.ADOQMBooks.FieldByName('Memo').AsString);
Data.ADOQMBooks.Next;
end;
运行时代码的+Data.ADOQMBooks.FieldByName('BookID').AsString+' '这一行报错,错误提示为Operator not applicable to this operand type,有谁知道这是怎么回事嘛?
 
没有人知道嘛?
 

没人来
想结帖都不行
 
当然错了,开头多了个“+”
 
接受答案了.
 
后退
顶部