Hi!
Is there any demo that shows how to use TOraSmartQuery which is based on several DBEdit components on the form?
I'm just missing something ... If some DbEdit fields are assigned to TOraSmartQuery how to:
1) Fill returning values (if user has changed them)...do I need to set some values or SmartQuery is smart enough to set the values by itself?
If is smart then:
2) If some fields are filled by trigger how to assign Insert and update values (i do not need them to fill) ... I allways get the errors that some fields are missing regardless that Oracle will fill them!?
All demos use Grid but in that way I cannot reach the point...how to (and if!!) send/retrieve data !
THX!
TOraSmartQuery and triggers (please make simple DbEdit controls demo...)
..i foubd it!
Grrrrrrrr!
These options....so nice so hidden...i knew it should be something easy...
)
These options....so nice so hidden...i knew it should be something easy...

1) You can use DBEdits with TSmartQuery and TOraTable components same as you use it with BDE TTable.
2) If you specify a default field value in Oracle table, for ex:then if you insert a record without "Id" field value it will have a default value. For ex.
also you can set TSmartQuery.Options.DefaultValue to True to get the default fields values. (see TOraDataSet.OptionsDS topic in ODAC help)
You can set Inset and Update statements manually, by assigning TSmartQuery.SQLUpdate and TSmartQuery.SQLInsert properties. (see TCustomDADataSet.SQLUpdate and TCustomDADataSet.SQLInsert topics in ODAC help)
2) If you specify a default field value in Oracle table, for ex:
Code: Select all
CREATE TABLE SmartDefaultTable(
Id NUMBER(6) DEFAULT 1,
Name VARCHAR2(20) )
Code: Select all
INSERT INTO SmartDefaultTable
(Name)
VALUES
('NameOne')
You can set Inset and Update statements manually, by assigning TSmartQuery.SQLUpdate and TSmartQuery.SQLInsert properties. (see TCustomDADataSet.SQLUpdate and TCustomDADataSet.SQLInsert topics in ODAC help)