- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
if not DM.For_Akc_Base_Update.InTransaction then
DM.For_Akc_Base_Update.StartTransaction;
Close;
SQL.Clear;
SQL.Add('insert into Bank (BNAME, full_name, bik, ks, inn, rkc,postind,postcity,postaddr,telef ) values ');
SQL.Add('('''+edName.Text+''', '''+mFull_Name.Text+''', ');
SQL.Add(' '''+edBik.Text+''', ');
SQL.Add(''''+edKS.Text+''', '''+edInn.Text+''', ');
SQL.Add(''''+edRkc.Text+''', '''+edInd.Text+''', ');
SQL.Add(''''+edCity.Text+''', '''+edAdr.Text+''', ');
SQL.Add(''''+edTel.Text+''' )');
ExecSQL;
DM.For_Akc_Base_Update.Commit;
DM.Bank.Close;
DM.Bank.Open;
Принял проект. Начал смотреть. Вот так вот добавляют запись в таблицу. И так по всему проекту.
> Вдруг понадобится вставить либо все записи либо ни одной?
BEGIN ... COMMIT уже выкинули из стандарта?
Ну хотя условия переиспользовать прям этот код не было.