delphi关于标准表达式中数据类型不匹配的问题
withAdoQuery1dobeginClose;SQL.Clear;SQL.Add('INSERTINTOfeedinfoDM(commonName,Breed,Fa...
with AdoQuery1 do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO feedinfoDM(commonName,Breed,FatDM,AshDM,CPDM,LigninNDF,StarchNSC,NDFDM,eNDFNDF,NDFIPCP,ADFIPCP,DIPCP,solCPCP,NPNsolCP,TDNDM,NEmMcalkg,MEMcalkg,NEgMcalkg');
SQL.Add(',CaDM,NaDM,PDM,KDM,MgDM,SDM,ClDM,Comgkg,Femgkg,Imgkg,Semgkg,Mnmgkg,Znmgkg,Cumgkg,METUIP,LYSUIP,ARGUIP,THRUIP,LEUUIP,ILEUIP,VALUIP,HISUIP,PHEUIP,TRPUIP,A1000IUkg,D1000IUkg,E1000IUkg,CAhr,CB1hr,CB2hr,PB1hr,PB2hr,PB3hr,FeedNo,DMAF)');
SQL.Add('values(:a,:b,:c,:d,:e,:f,:g,:h,:i,:j,:k,:l,:m,:n,:o,:p,:q,:r,:s,:t,:u,:v,:w,:x,:y,:z,:aa,:ab,:ac,:ad,:ae,:af,:ag,:ah,:ai,:aj,:ak,:al,:am,:an,:ao,:ap,:aq,:ar,:as,:at,:au,:av,:aw,:ax,:ay,:az,:ba)');
Parameters.Items[0].value:=Edit50.Text;
Parameters.Items[1].value:=ComboBox1.Text;
if edit1.text='' then
Parameters.Items[2].value:=0
else
Parameters.Items[2].value:=strtofloat(Edit1.Text);
字段2为数值型。那么 Parameters.Items[2].value:=strtofloat(Edit1.Text);
哪里错了。应该怎么改。 展开
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO feedinfoDM(commonName,Breed,FatDM,AshDM,CPDM,LigninNDF,StarchNSC,NDFDM,eNDFNDF,NDFIPCP,ADFIPCP,DIPCP,solCPCP,NPNsolCP,TDNDM,NEmMcalkg,MEMcalkg,NEgMcalkg');
SQL.Add(',CaDM,NaDM,PDM,KDM,MgDM,SDM,ClDM,Comgkg,Femgkg,Imgkg,Semgkg,Mnmgkg,Znmgkg,Cumgkg,METUIP,LYSUIP,ARGUIP,THRUIP,LEUUIP,ILEUIP,VALUIP,HISUIP,PHEUIP,TRPUIP,A1000IUkg,D1000IUkg,E1000IUkg,CAhr,CB1hr,CB2hr,PB1hr,PB2hr,PB3hr,FeedNo,DMAF)');
SQL.Add('values(:a,:b,:c,:d,:e,:f,:g,:h,:i,:j,:k,:l,:m,:n,:o,:p,:q,:r,:s,:t,:u,:v,:w,:x,:y,:z,:aa,:ab,:ac,:ad,:ae,:af,:ag,:ah,:ai,:aj,:ak,:al,:am,:an,:ao,:ap,:aq,:ar,:as,:at,:au,:av,:aw,:ax,:ay,:az,:ba)');
Parameters.Items[0].value:=Edit50.Text;
Parameters.Items[1].value:=ComboBox1.Text;
if edit1.text='' then
Parameters.Items[2].value:=0
else
Parameters.Items[2].value:=strtofloat(Edit1.Text);
字段2为数值型。那么 Parameters.Items[2].value:=strtofloat(Edit1.Text);
哪里错了。应该怎么改。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询