On 25-3-2017 15:09, Clyde Eisenbeis wrote:
> I should have started this email with ... C# ... Firebird ADO.NET ...
> FirebirdClient.5.8.0 ... Visual Studio 2013.
>
> I tried entering
>
>     CREATE GENERATOR gen_t1_id;
>     SET GENERATOR gen_t1_id TO 0;
>
>     set term !! ;
>     CREATE TRIGGER T1_BI FOR T1
>
> in my C# code ... the compiler complains.  This appears to not be
> relevant for C#.

You need to show how you execute this. For example `set term` is unknown 
in Firebird itself, it is just client-side functionality in a number of 
Firebird tools (like isql, flame robin, and in the Firebird ADO.net 
provider FbScript tool.

If you are not using FbScript, but executing these statements like 
normal commands, then you must execute 1) leave out `SET TERM`, and 
execute the statements individually.

> What I need is the ability to add data and retrieve the primary key
> which needs to be autoincremented ... see
> http://stackoverflow.com/questions/42981872/why-the-executenonquery-catch-exception-validation-error-for-column-orgtable
> for the current code.

Use `INSERT .... RETURNING ID`.

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to