Z
zyx0404
Unregistered / Unconfirmed
GUEST, unregistred user!
var
connection : TQuery;
strSQL, strSQLFields, strSQLWhere, strSQLRule : String;
begin
connection := TQuery.Create(self);
connection.AutoCalcFields := true;
connection.DatabaseName := m_db.DatabaseName;
...
//set the sql
connection.Close;
connection.SQL.Clear;
connection.SQL.Text := strSQL;
connection.Open;
//save the data to entity
nColumnCounts := connection.FieldCount;
数据库表有3个字段,但是connection.FieldCount却是1,为什么?
connection : TQuery;
strSQL, strSQLFields, strSQLWhere, strSQLRule : String;
begin
connection := TQuery.Create(self);
connection.AutoCalcFields := true;
connection.DatabaseName := m_db.DatabaseName;
...
//set the sql
connection.Close;
connection.SQL.Clear;
connection.SQL.Text := strSQL;
connection.Open;
//save the data to entity
nColumnCounts := connection.FieldCount;
数据库表有3个字段,但是connection.FieldCount却是1,为什么?