网
网虾
Unregistered / Unconfirmed
GUEST, unregistred user!
我按照一书例将一tquery的sql设为如下
select UserID,UserName,TrueName
from user
where not exists(
select GroupID
from Members
where (members.UserID=users.UserID) and (members.GroupID=:GroupID))
group by UserName,TrueName,UserID
tquery的databasename为dsGroup,dsGroup的dataset为tbGroup,tbGroup对应的group中包含有GroupID字段(为autoincrement类型),但members中的GroupID字段(为shortint类型)。tquery的active可设为true,在dsGroup的active设为true时;与tquery连接的dbgrid显示UserName,TrueName,UserID三列。
但每次重新打开程序显示tbGroup:field'GroupID' not found的提示信息,tquery的active变为false,请问各位大侠是何原因,该如何解决?
select UserID,UserName,TrueName
from user
where not exists(
select GroupID
from Members
where (members.UserID=users.UserID) and (members.GroupID=:GroupID))
group by UserName,TrueName,UserID
tquery的databasename为dsGroup,dsGroup的dataset为tbGroup,tbGroup对应的group中包含有GroupID字段(为autoincrement类型),但members中的GroupID字段(为shortint类型)。tquery的active可设为true,在dsGroup的active设为true时;与tquery连接的dbgrid显示UserName,TrueName,UserID三列。
但每次重新打开程序显示tbGroup:field'GroupID' not found的提示信息,tquery的active变为false,请问各位大侠是何原因,该如何解决?