Re: retrieve bigint/bigserial from C++ API
Posted in 2014
Added to the FAQ. Sathyanesh Krishnan added to the credits! Regards, David. > On 07 February 2014 at 22:00 Sathyanesh Krishnan <satyan@us.ibm.com> wrote: > > > Hi Frank, > > The Informix LIB C++ library has no support for BIGINT/BIGSERIAL. > The BIGINT/BIGSERIAL are relatively new data type added to IDS as an > alternative to INT8/SERIAL8. > By the time this type has introduced with IDS the LIB C++ library has g= > one > in the maintenance only mode and now it got deprecated as well (though = > LIB > C++ continue to ship with CSDK). > > Regards, > Satyan > > Advisory Software Engineer > R&D - IBM Information Management Division > 11200 Lakeview, Lenexa, KS 66219 > Tel: 913 599 8792 (T/L: 337-8792) > > From: "FRANK" <yunyaoqu@gmail.com> > To: ids@iiug.org, > Date: 02/04/2014 03:19 PM > Subject: retrieve bigint/bigserial from C++ API [32407] > Sent by: ids-bounces@iiug.org > > HI, All, > > IDS11.50 FC8 , RHEL5/6, CSDK 3.70.FC1. > > Our developer found it is inconvenient( inconsistency) to manipulate > bigint/bigserial data type in C++ libray of CSDK. The following is what= > > he found. > > Any idea or suggestion? > > Thanks, > Frank > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D > For a BIGINT/BIGSERIAL column ITValue::Printable() returns an ITString = > that > > contains a hexadecimal little-endian representation of the integer (we = > run > on a little-endian platform), but for an INT8 or SERIAL8 the ITString h= > as a > > decimal representation of the integer. For example, if the value 383816= > 32 > is stored in a SERIAL8 column, then the ITString will contain "38381632= > ", > but if it is in a BIGSERIAL column, then the ITString will have > "0x40a8490200000000" > > I would ask them if this is the expected behavior and what's the best w= > ay > to get an integer value in a uniform way regardless of whether the > underlying DB type is INT8/SERIAL8 or BIGINT/BIGSERIAL. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > > --001a11c11fee3d7eb204f19b30f1 > > ***********************************************************************= > ******** > > Forum Note: Use "Reply" to post a response in the discussion forum. > > = > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >