128 |
|
|
129 |
|
uses IB, Unit2, Unit4, Unit5; |
130 |
|
|
131 |
+ |
const sNoName = '<no name>'; |
132 |
+ |
|
133 |
|
function ExtractDBException(msg: string): string; |
134 |
|
var Lines: TStringList; |
135 |
|
begin |
296 |
|
EmployeesJOB_CODE.AsString := 'SRep'; |
297 |
|
EmployeesJOB_GRADE.AsInteger := 4; |
298 |
|
EmployeesSALARY.AsCurrency := 20000; |
299 |
< |
EmployeesFIRST_NAME.AsString := '<no name>'; |
300 |
< |
EmployeesLAST_NAME.AsString := '<no name>'; |
299 |
> |
EmployeesFIRST_NAME.AsString := sNoName; |
300 |
> |
EmployeesLAST_NAME.AsString := sNoName; |
301 |
|
EmployeesHIRE_DATE.AsDateTime := now; |
302 |
|
EmployeesDEPT_NO.AsString := '000'; |
303 |
|
FDirty := true; |
311 |
|
|
312 |
|
procedure TForm1.EmployeesBeforeClose(DataSet: TDataSet); |
313 |
|
begin |
312 |
– |
with DataSet do |
313 |
– |
if State in [dsInsert,dsEdit] then |
314 |
– |
try |
315 |
– |
Post; |
316 |
– |
except |
317 |
– |
Cancel; |
318 |
– |
raise; |
319 |
– |
end; |
314 |
|
TotalsQuery.Active := false |
315 |
|
end; |
316 |
|
|