如
系统参数
@@trancount
我在DELPHI中要怎样才能获的@@trancount的值呢?showmessage(inttostr(adoquery1.Parameters.ParamByName('@@trancount').Value));
这是我的语句,运行时报错说.adoquery1找不到变量@@trancount'.
系统参数
@@trancount
我在DELPHI中要怎样才能获的@@trancount的值呢?showmessage(inttostr(adoquery1.Parameters.ParamByName('@@trancount').Value));
这是我的语句,运行时报错说.adoquery1找不到变量@@trancount'.
....
showmessage(inttostr(adoquery1.Fieldbyname('trancount').Asstring));
adoquery1:field 'trancount' not found
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select @@trancount as trancount');
adoquery1.ExecSQL;
showmessage(inttostr(adoquery1.Parameters.ParamByName('trancount').Value));
adoquery1:Parameter '@@trancount' not found
是不是我的代码哪有问题?要不写出你们的全代码来我看看.
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select @@trancount as [trancount]');
adoquery1.Open; //改成open
showmessage(self.ADOQuery1.FieldByName('trancount').AsString);