F
foxczf
Unregistered / Unconfirmed
GUEST, unregistred user!
李维书《ado/mts/com+.....》的配套光盘的ch08 中,
procedure TmtsEmployeeCoordinator.UpdateEmployeeData(
var vDatas: OleVariant);
var
ias : IAppServer;
iErrorCount : Integer;
OwnerData : OleVariant;
vResult : OleVariant;
employeeObj : ImtsEmployeeObj;
TransactionContextEx: ITransactionContextEx;
begin
TransactionContextEx := CreateTransactionContextEx;
try
OleCheck(TransactionContextEx.CreateInstance(CLASS_mtsEmployeeObj, IID_ImtsEmployeeObj, employeeObj));
ias := employeeObj as IAppServer;
vResult := ias.AS_ApplyUpdates('dspEmployee', vDatas, 0, iErrorCount, OwnerData);
showmessage(inttostr(iErrorCount));
except
TransactionContextEx.Abort;
raise;
end;
TransactionContextEx.Abort;
end;
更新时,没有报任何错,但就是,没有更新到SQL中?
procedure TmtsEmployeeCoordinator.UpdateEmployeeData(
var vDatas: OleVariant);
var
ias : IAppServer;
iErrorCount : Integer;
OwnerData : OleVariant;
vResult : OleVariant;
employeeObj : ImtsEmployeeObj;
TransactionContextEx: ITransactionContextEx;
begin
TransactionContextEx := CreateTransactionContextEx;
try
OleCheck(TransactionContextEx.CreateInstance(CLASS_mtsEmployeeObj, IID_ImtsEmployeeObj, employeeObj));
ias := employeeObj as IAppServer;
vResult := ias.AS_ApplyUpdates('dspEmployee', vDatas, 0, iErrorCount, OwnerData);
showmessage(inttostr(iErrorCount));
except
TransactionContextEx.Abort;
raise;
end;
TransactionContextEx.Abort;
end;
更新时,没有报任何错,但就是,没有更新到SQL中?