Page 1 of 1

TIBCUpdateSQL problem

Posted: Mon 06 Sep 2010 11:48
by mariusz
I have situation like below:

TDGBrid-> TIBCQuery -> TIBCUpdateSQL

In TIBCQuery I have a little bit complicated query like this

Code: Select all

select s.*, d.id_detalu, p.id_prac2detal, p.czas_plan_jedn
from stanowiska s
left join detale d on 1=1
left join prac2detal p on p.id_detalu = :id_detalu and p.id_stanowiska=s.id_stanowiska
where s.id_stanowiska  'A' and d.id_detalu = :id_detalu
order by s.nazwa
TIBCUpdateSQL should execute following query on update

Code: Select all

update or insert
into prac2detal (id_detalu, id_stanowiska, czas_plan_jedn, id_prac2detal) 
values (:id_detalu, :id_stanowiska, :czas_plan_jedn, :id_prac2detal)
Long time it has worked without problems, but since some IBC build, it doesn't work. I can not make changes in DBGrid. I can not write in DBGrid.
I have project which worked. After compilation with IBC 3.10.0.15 i doesn't.

Can anyone help me?

Here you are components description:

Code: Select all

  object CRDBGrid1: TCRDBGrid
    Left = 8
    Top = 120
    Width = 297
    Height = 369
    DataSource = prac2detal_ds
    Enabled = False
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    Columns = 
  end

Code: Select all

  object prac2detal: TIBCQuery
    Connection = Form1.IBCConnection1
    Transaction = Form1.rw
    UpdateTransaction = Form1.rw
    SQL.Strings = ()
    MasterSource = detal_ds
    UpdateObject = IBCUpdateSQL1
    BeforeInsert = prac2detalBeforeInsert
    AfterInsert = prac2detalAfterInsert
    BeforeDelete = prac2detalBeforeInsert
    Left = 96
    Top = 176
    ParamData = 
  end

Code: Select all

  object IBCUpdateSQL1: TIBCUpdateSQL
    ModifySQL.Strings = ()
    Left = 96
    Top = 208
  end

Posted: Tue 07 Sep 2010 07:48
by AndreyZ
Hello,

To make changes in prac2detal table you have to set the TIBCQuery.UpdatingTable property like this:
prac2detal.UpdatingTable := 'prac2detal';