Mercea Paul wrote:
>> Let's clarify this a little.
>> 
>> You have table with PK ID, the ID is generated by generator in trigger,
>> right?
>> If you insert the row into grid you get error because ID is null,
>> right?
> 
> Right!

Well, this is a problem by design.

The MS SQL has "identity", which is in fact something like autoincrement id. 
This is a property of column. But FB has more powerfull (OK, little bit PR) 
generators. But bind between column and (trigger and) generator cannot be 
discovered easily.

So if you define it as PK (with not null constraint of course) and then you 
create trigger and generator, nobody has any idea, that this "autoincrement" 
is there. So according to known info, provider generates field with not null 
constr.

The solution is easy (as you said), i.e. remove not null or add smoe default 
value or create identity in grid (I'm not sure whether this works).

PS: Somebody I have a feeling that developers think, that DDEX will do all 
the work. If I generate something, I go into properties and I check it. The 
MS SQL server DDEX has also some limitations (or maybe it's too smart), so 
even if working with MS SQL, I'm "improving" i.e. parameters definitions.

-- 
Jiri {x2} Cincura
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to