If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Problem in fetching data from informix 9.4 using esql.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-04, 04:30
deepakg76 deepakg76 is offline
Registered User
 
Join Date: Oct 2003
Posts: 4
Problem in fetching data from informix 9.4 using esql.

We are using informix dynamic server 9.4 and client SDK 2.8.1. My program fetches the data from informix server using esql/c.

When I fetch the data from the informix, it fetches the correct data(varchar) for first record and for other record it fetches only 4 bytes.
The sample of my code is:

case SQLVCHAR :
case SQLCHAR :

EXEC SQL GET DESCRIPTOR escrs[Cur_thread->num] VALUE :i
:char_len = LENGTH;

c_char_len = char_len;
char_data = (char *) realloc (char_data, c_char_len + 1);

EXEC SQL GET DESCRIPTOR escrs[Cur_thread->num] VALUE :i
:indicate = INDICATOR,
:char_data = DATA;

EXEC SQL SET DESCRIPTOR escrs[Cur_thread->num] VALUE :i
DATA = '\0';

if (indicate == -1)
char_data[0] = '\0';
else
char_data[byleng(char_data, char_len)] = '\0';

c_char_len = strlen (char_data);

The same program is working fine on informix 9.2 as well as 9.3 and client SDK 2.8.1.
It is very critical problem, i need to resolve it ASAP.

Any suggestion will be appreciated.

Thanx in Advance!
Deepak
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On