I'm using a TUniQuery Component and I'm able to construct an SQL command string to insert new data to a table. Now I'm testing TUniQuery::SQLInsert and fields to prevent me from building commands on string level. As I have found out field names have to be defined in the TUniQuery::SQLInsert::Text and their values have to be set before a TUniQuery::Post is called.
Sometimes I want to set a value for the field but in other situations I would like the database set their default value for it. In other words I'd like to pass a DEFAULT then. How can I do this without altering the TUniQuery::SQLInsert::Text?
How to insert DEFAULT?
Re: How to insert DEFAULT?
Hello,
Did you try ?
UQ.Options.DefaultValues:=true;
Regards
Michal
Did you try ?
UQ.Options.DefaultValues:=true;
Regards
Michal
Re: How to insert DEFAULT?
Saw it, but didn't try. I was looking for a field property DEFAULT. But this global Options.DefaultValues is the better approach. I have to fill known values only and unknown are set by DBMS. I've tried it - works fine.Did you try ? UQ.Options.DefaultValues:=true;
Thx
Re: How to insert DEFAULT?
It is good to see that the problem has been solved. Feel free to contact us if you have any further questions about UniDAC.