d:\merry_xmas.mid 我是这样写的,但是不对,编译没错,运行出错这时代码: with query do begin active:=false; sql.clear; sql.add('select 商品名称,商品价格 from 商品信息 '); active:=true; first; while not EOF do begin FoodInfoCheckListBox.Items.Add(fieldByname('商品名称').value+fieldByname('商品价格').value); next; end; end; query.First;这是错误信息: project project1.exe raised exception class EvariantTypeCastError with message 'Could not convert variant of type (OleStr) into type (double)'.process stopped.
是这个意思吗?
比如:
str1,str2:string;
str1:=我说明;
str2:=白一点;
ListBox.items.add(str1);
ListBox.items.add(str2);
现在应该是这样的:
|--Listbox---|
我说明
白一点
我想要的效果是:
|--Listbox---|
我说明白一点
str1:=我说明;
str2:=白一点;
ListBox.items.add(str1+str2);
应该可以了吧
s2:='很高兴认识你!';
s:=s1+s2;
listbox1.items.add(s);
如果是要将表当中的内容增加进去只要将要增加的字段的字段名赋给s1和s2就可以了,有什么在交流!!
str2:=‘大概是这样’;
ListBox.items.add(str1);
ListBox.items.add(str2);
listbox1.Items.Insert (0,listbox1.Items.CommaText);
我是这样写的,但是不对,编译没错,运行出错这时代码:
with query do
begin
active:=false;
sql.clear;
sql.add('select 商品名称,商品价格 from 商品信息 ');
active:=true;
first; while not EOF do
begin
FoodInfoCheckListBox.Items.Add(fieldByname('商品名称').value+fieldByname('商品价格').value);
next;
end;
end;
query.First;这是错误信息:
project project1.exe raised exception class EvariantTypeCastError with message 'Could not convert variant of type (OleStr) into type (double)'.process stopped.