Skip to main content

Problem:

Net Express 3.1 and 4.0

A Microsoft Access table has a MEMO field defined within it.  This is a large, varaible length text field.  When you try to insert or update data from OpenESQL you get a SQLCODE of -98.

Resolution:

At present, a host variable is limited to 64K in OpenESQL.  A MEMO field can go beyond this limit so with the current release of Net Express you cannot exceed 64K.  However, it is possible to use a MEMO field within this limit:

1) Define the MEMO host variable as SQL TYPE IS LONG-VARCHAR(64000).

2) Next, set the length of the host variable, move the data and initialize the null pointers.

        move 64000 to host-variable-len.

        move "test" to host-variable-val.

        initialize host-variable-null.

   this is required as the LONG-VARCHAR SQL type actually generates a structure with length and

   value variables.  Obviously, the "test" data should be replaced with your own value.

Old KB# 6889

#EnterpriseDeveloper
#Enterprise
#MainframeExpressandMFE
#COBOL
#netexpress
#MFDS