DESCRIPTOR area in ESQL/C for AIX vrs SCO

DESCRIPTOR area in ESQL/C for AIX vrs SCO

Post by Axel Granho » Tue, 18 Apr 1995 04:00:00



We are having the following problem porting our application to AIX:

A system descriptor area is set up to receive values from a dynamic
cursor (select statement).  I then do a FETCH NEXT on this cursor untill
I receive an sqlca.sqlcode = 100.

Here is the problem:

On SCO, the ststem descriptor area retains the values from the last good
fetch, on AIX it seems to destroy this data. (I did an risnull() on the
data, and it is not setting the values to null.)

I know of a couple of ways to alter my code to "fix" this, (by either
doing a fetch previous, or stopping when a pre-defined number of rows are
returned) just wondering if anyone has and similar experiences.

Please post or e-mail reply

 
 
 

1. indicators, esql and descriptor areas

I have a problem where I'm using descriptor areas in esql, and
Informix seems to be ignoring indicator values for input parameters in
update or insert statements.  It sets the data correctly in the
database, but it never sets the field to null, even if the indicator
value is -1.

Here's an example:

EXEC SQL ALLOCATE DESCRIPTOR "desc";

EXEC SQL BEGIN DECLARE SECTION;
char* charData = "foo";
long len = 4;
short ind = -1;
int dataType = SQLVCHAR;
int index = 1;
EXEC SQL END DECLARE SECTION;

EXEC SQL SET DESCRIPTOR :h_daName VALUE :index
        DATA = :charData,
        TYPE = :dataType,
        INDICATOR = :ind,
        LENGTH = :len;

If I execute a statement using a statement like "UPDATE CUSTOMERS SET
FIRST_NAME = ?" with the above descriptor area, the first name field
is set to "foo", not null, as I would have expected.

Any ideas?

--
Steve Molitor

"Emacs is the Computer"

2. EDA SQL

3. ESQL/C System-Descriptor-Area

4. db4's make

5. ESQL/C with system descriptor area

6. Table Size

7. Informix-4GL | ESQL/C (SCO,AIX) Opening..

8. return key

9. Using ESQL/C Dynamic SQL System Descriptors

10. Help on Using System Descriptors (ESQL/C)

11. ESQL/C Precompiler bug using SET DESCRIPTOR?!

12. descriptors in esql/c

13. Esql/C Set Descriptor