[fpc-pascal] MSSQL and ftAutoInc: FPC 2.6.5 changes the behavior of 2.6.2 but AutoInc not works yet

LacaK lacak at zoznam.sk
Fri Apr 25 12:55:54 CEST 2014


Martin Schreiber  wrote / napísal(a):
> On Friday 25 April 2014 07:46:23 LacaK wrote:
>   
>> Do you have tried for ftAutoInc field simply set ReadOnly:=False; ?
>> -Laco.
>> P.S. there is feature request about automatic fetching of new values of
>> idnetity columns, but implementing it in generic way for all supported
>> SQLConnections is not trivial ;-)
>>
>>     
> In MSEgui I used flags in tfield.providerflags1 
> (pf1_refreshinsert,pf1_refreshupdate) which trigger the use of 
> the "returning" clause in insert or update statement if the DB supports it. 
> Additionally there is tcustomsqlconnection.updateprimarykeyfield() which is 
> called after insert, it automatically updates the primary key field field 
> with the "last insert id" if the DB supports it.
> The third option is to use tsequencelink which automatically fetches sequence 
> values from the DB before inserting.
>   
Thanks for interesting points, ideas
-Laco.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140425/67e14f24/attachment.html>


More information about the fpc-pascal mailing list