Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Wilson J. on May 08, 2014, 05:42:01 pm



Title: serialreg
Post by: Wilson J. on May 08, 2014, 05:42:01 pm
Hi, just wondering if anyone is still using the serialreg table to emulate Informix serial columns in a SQL Server db, and has it working with Genero BDL 2.50?   We still have some older code that has not been converted to work with identity columns yet.   The triggers are working, generating the correct value, but the value isn't being returned into sqlca.sqlerrd[2]... it is always zero.

Working with SQL Server versions 2008 and 2012, using native driver in ODBC and "dbmsncA0" in the fglprofile entry for dbi.database.db.driver.

According to the Genero BDL User Guide 2.50 it still exists
https://4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#c_fgl_odiagmsv_010.html

Thanks.




Title: Re: serialreg
Post by: Sebastien F. on May 08, 2014, 06:58:06 pm
Hello Wilson,

What was you previous Genero version?

In version 2.20 we have introduced the BIGINT data type and the SERIALREG table should now use BIGINT instead of INTEGER.

I suggest that you have a look as this upgrade note:
www.4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#c_fgl_Mig0004_011.html

Since SQLCA.SQLERRD[2] is defined as an INTEGER, it cannot hold BIGINT values so it's probably the reason why it's always zero.

What is the current definition / schema of your serialreg table?

Maybe it's a good opportunity to get rid of the "regtable" emulation and use identity columns instead?

The office is closed so I cannot make tests, but I wanted to point you to this note.
Seb


Title: Re: serialreg
Post by: Sebastien F. on May 08, 2014, 06:59:52 pm
See also:

https://4js.com/online_documentation/fjs-fgl-manual-html/?path=fjs-fgl-manual#c_fgl_Mig0006_008.html

Seb


Title: Re: serialreg
Post by: Wilson J. on May 08, 2014, 08:07:38 pm
Thanks,

The URL in the last post provided the answer we were looking for (the triggers have changed subtly).