SELECT sum(Ball."Money") as a FROM "ball.DB" Ball 取出来的时候 a:=query.fieldbyname('a').asstring; 或者 a:=query.fields[0].asstring;
query1.close; query1.sql.clear; query1.sql.add('select sum(字段) as a1 from 表 group by 字段'); query1.open; edit1.text:=query1.query1.FieldByName('a1').asstring;
有出错呀 Project Project1.exe raised exception class EDBEngineError with message 'An error occurred while attempting to initialize the Borland Database Engine (error $2501)'.Process stopped.Use Step or run to continue
取出来的时候
a:=query.fieldbyname('a').asstring;
或者
a:=query.fields[0].asstring;
query1.sql.clear;
query1.sql.add('select sum(字段) as a1 from 表 group by 字段');
query1.open;
edit1.text:=query1.query1.FieldByName('a1').asstring;
Project Project1.exe raised exception class EDBEngineError with
message 'An error occurred while attempting to initialize the Borland Database Engine (error $2501)'.Process stopped.Use Step or run to continue