how to muti update table
ex
select a.id,b.name from a,b where a.id=b.id
now i update a only
how to do !!
muti update table
Moderators: gto, cipto_kh, EgonHugeist
Code: Select all
object Form2: TForm2
object DBGrid1: TDBGrid
DataSource = DataSource1
end
object DBNavigator1: TDBNavigator
DataSource = DataSource1
end
object ZUpdateSQL1: TZUpdateSQL
InsertSQL.Strings = (
'insert into a (id) value (:id);'
''
'insert into b (id,name) values ( :id, :name );')
ModifySQL.Strings = (
'update a set a.id = :id where a.id = :old_id;'
''
'update b set b.id = :id, b.name = :name where b.id= :old_id;')
UseSequenceFieldForRefreshSQL = False
Left = 136
Top = 8
ParamData = <
item
DataType = ftUnknown
Name = 'id'
ParamType = ptUnknown
end
item
DataType = ftUnknown
Name = 'old_id'
ParamType = ptUnknown
end
item
DataType = ftUnknown
Name = 'name'
ParamType = ptUnknown
end>
end
object ZQuery1: TZQuery
UpdateObject = ZUpdateSQL1
SQL.Strings = (
'select a.id,b.name from a,b where a.id=b.id')
Params = <>
Left = 88
Top = 8
end
object DataSource1: TDataSource
DataSet = ZQuery1
Left = 176
Top = 8
end
end
Dorin Hongu