0
请问你能帮助我吗?我在Access中有一个数据库和一个用Delphi编写的程序(我使用了Ehlib库),我试图在VBA中重写该程序。如何检查VBA中的记录集中是否有记录?
with CustomDriver do
try
with SelectCommand do
begin
CommandText.Text := 'select count(*) from OBJ_APP a' + ^M +
'where ID_App = :AID_App and exists (select 1 from obj_app b where b.ID_Obj = a.ID_Obj and b.ID_App = :AID_App_Replace)';
Parameters.ParamByName('AID_App').Value := AID_App;
Parameters.ParamByName('AID_App_Replace').Value := AID_App_Replace;
end;
vFree := True;
ExecuteCommand(SelectCommand, DsReplace, vFree);
if (DsReplace <> Nil)
and(DsReplace.RecordCount > 0)
and(DsReplace.Fields[0].AsInteger > 0) then
如何在VBA中编写最后三行代码?有没有比& Chr (34) &
更容易编写双引号的方法?