完整代码:
call connect on clearsql;
sqlcommand = "select sum(distinct gedimai.gedimo_salinimo_vidkaina) as suma, count(distinct gedimai.gedimo_salinimo_vidkaina) as kiekis from atveju_simptomai left join gedimai_simptomai on gedimai_simptomai.simptomo_id = atveju_simptomai.simptomo_id left join gedimai on gedimai.id = gedimai_simptomai.gedimo_id where atveju_simptomai.atvejo_id = '8'";
set results to the outcome of executeQuery on clearsql using sqlcommand.
set resultAvailable to the outcome of next on results.
print(String.valueOf(results.getInt("suma")));
print(results.getString("suma"));
objectResults.kaina_viso = results.getString("suma");
set resultAvailable to false.
call disconnect on clearsql;
print(results.getString("suma"))是可以的-打印到屏幕"185.0",但objectResults.kaina_viso=results.getString("suma")给出了一个错误。
objectResults.kaina_viso是字符串类型。结果是DebResultSet
com.blazesoft.enginees.rules.NdEvaluationException:调用"getString"失败[Microsoft][ODBC Driver 11 for SQL Server]描述符无效在函数中计算"results.getString("suma")"时索引获取价格数量
已解决!这是Blaze Advisor/Eclipse或Java错误。1.注释了所有代码并保存。2.未注释的代码。3.它在没有任何更改的情况下工作