iexc := round(iexc/icount);
iint := round(iint/icount);
inau := round(inau/icount);
iovr := round(iovr/icount);
adoquery1.SQL.Text := 'update Tickets_Tbl set Excitment = iexc where
RollerCoaster = "'+sride+'"';
adoquery1.ExecSQL;
adoquery1.SQL.Text := 'update Tickets_Tbl set Intensity = iint where
RollerCoaster = "'+sride+'"';
adoquery1.ExecSQL;
adoquery1.SQL.Text := 'update Tickets_Tbl set Nausea = inau where
RollerCoaster = "'+sride+'"';
adoquery1.ExecSQL;
adoquery1.SQL.Text := 'update Tickets_Tbl set Overall = iovr where
RollerCoaster = "'+sride+'"';
adoquery1.ExecSQL;
主要問題是,當我運行代碼時,它一直說沒有字段開始更新的默認值。請幫忙。使用Delphi 10在MS Access中使用整型變量更新整型值
不知道德爾福,但我猜(根據你的其他線),'adoquery1.SQL.Text:='更新Tickets_Tbl設置Excitment = iexc其中'應該是'adoquery1.SQL.Text:='更新Tickets_Tbl set Excitment ='+ iexc +'where'(即你想從你的程序中插入值到SQL語句中) – YowE3K
問題是你用常量字符串'iexc'而不是那個變量。但使用參數。 – Victoria