I have a TUniQuery with SqlInsert and SqlUpdate properties specified. The update works fine. I want to execute the insert statement if a certain field is null. I figure it would involved the OnUpdateRecord event and a method call to apply a certain Sql statement, like TUpdateSQL.Apply method.
What's the best way to accomplish this?
TUniQuery: Turn an update into an insert.
-
kamiller42
- Posts: 40
- Joined: Thu 27 Jan 2011 22:31
Re: TUniQuery: Turn an update into an insert.
Never mind. Figured this out using SQL. I supposed using cached updates and a TUniUpdateSQL would have worked too. Figured UniQuery had all it needed to apply one of its DML if called to do so.