How to convert a TEXT to CHAR
Posted in 2009
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I have a TEXT column and expecting it's substring( col[1,250] ) in a string variable inside ESQL/C program. How do I achieve this..any clue..? Thanks in advance. ~pradeep
Problem here is that the subscript of a TEXT column returns TEXT data , whereas I 'm expecting an CHAR data. Do we have any way out to convert TEXT data to CHAR ..? Thanks
See the sample program getcd_me.ec in $INFORMIXDIR/demo/esqlc You have to configure and use a DESCRIPTOR or an sqlda structure and configure a locator structure to copy the incoming blob column data into your character array. You can also look at the code for my ul.ec utility in the utils2_ak package. Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Aug 31, 2009 at 4:39 AM, PRADEEP KUMAR <pkyadav1@hotmail.com> wrote: > I have a TEXT column and expecting it's substring( col[1,250] ) in a string > variable inside ESQL/C program. > > How do I achieve this..any clue..? > > Thanks in advance. > > ~pradeep > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001517402aa4bf73aa047277435d