
APAR= II09604
ODBC TROUBLESHOOTING - CA400WIN95 CA400WIN CA400OS2OPT  V2.0
CONTINUED FROM II09603
*** This is a continuation of II09603 *** UPDATED 2/17/97

 3.3 PROBLEMS WITH STORED PROCEDURES
 ===================================

 Internal Driver Error
 MSGSQL0901 SQL system error
 ---------------------------

 This error is generated when using output or input/output
 parameters and the server is unable to find a valid DECLARE
 or CREATE procedure describing the type of parameters.

 If using CREATE PROCEDURE then try running
 a query over QSYS2/SYSPROCS to verify the create procedure
 was run correctly.  SPECIFIC_SCHEMA and ROUTINE_SCHEMA
 must match the library used on the call in the PC application.
 EXTERNAL_NAME must resolve to the actual program name.
 The parameter descriptions must also be correct.

 If using DECLARE PROCEDURE then you must use extended
 dynamic support to return output or input output
 parameters.  The call of the stored procedure must be
 stored in the active package.  Use PRTSQLINF on the package
 to verify it's contents.  DELETE THE SQL PACKAGE AFTER
 MAKING ANY CHANGE TO DECLARE PROCEDURE.  Parameter
 descriptions are stored in the package as part of the call
 entry, not the declare entry.

 DECLARE PROCEDURE takes precedence over CREATE PROCEDURE.
 Delete the package if the problem persists.

 No data returned on OUTPUT and INPUT_OUTPUT parameters
 ------------------------------------------------------

 -   ODBC SQLBindParameter incorrectly specified fParamType as
     SQL_PARAM_INPUT.

 -   Using DECLARE PROCEDURE instead of CREATE PROCEDURE and
     extended dynamic support is disabled.

 -   Incorrectly declared parameter as IN on the CREATE or
     DECLARE For R360 systems only, SF30900 or later is
     required.

 MSGSQL0501 Cursor CRSR000x not open
 No data returned on Result set
 ------------------------------------
 You must specify the compile option ACTGRP(*CALLER) and not
 *NEW to return data.

Column Names for array result sets and derived columns
------------------------------------------------------
Derived columns and columns returned by a stored procedure that
are not from an open cursor do not have associated column names.
Currently the AS/400 just returns blanks column names for those
columns and this can cause problems for some ODBC applications.
In particular, the Visual Basic Data Control requires non-null
field names.
Service Packs SF36095 (R310) and SF36096 (R311) will supply
default names for the columns.

 3.4 Incorrect Output and Unpredictable Errors
 =============================================

 The ODBC driver manager and client access ODBC driver
 should be at matching versions of the ODBC specification or
 unpredictable results may occur. Applications do not call the
 client access ODBC driver directly. The application loads the
 ODBC driver manage r, ODBC.DLL.  This in turn loads the client
 access ODBC dll. API calls pass through the driver manager
 and can be altered by the driver manager.  Multiple errors
 may occur if ODBC.DLL is downlevel from the client access
 ODBC driver. The following is a list of Client Access
 products and their corresponding ODBC level:

  -  Client Access for Windows R310 (only):     ODBC 1.0
  -  Client Access for Windows R311 and later:  ODBC 2.1C
  -  Client Access Optimized for OS/2r:         ODBC 1.0
  -  Client Access for Windows 95:              ODBC 2.5

 MSGPWS0005 - Error occurred in the OS/400 database
 server code.
 ---------------------------------------------------------------
 This error could be caused by damaged or missing files that
 the database server needs to operate.  This can be caused
 by restoring licensed product 5763SS1 Option 12 (Host
 Servers) from a save tape built prior to applying PTF
 SF23488. To fix these files, do the following on the AS/400
 command line:

  -  Restrict all users from using ODBC or the database
     server.

  -  End the database server job:
      QSYS/ENDPJ PGM(QIWS/QZDAINIT) SBS(QSERVER)
      OPTION(*IMMED)

  -  Wait for the job to end:
        QSYS/DLYJOB DLY(15)

  -  Rebuild the database files:
        QSYS/CALL PGM(QIWS/QZDAXRLF) PARM(DLT)
        QSYS/CALL PGM(QIWS/QZDAXRLF) PARM(CRT)

  -  Restart the database server:
     QSYS/STRPJ SBS(QSERVER) PGM(QIWS/QZDAINIT)

 Hexidecimal data instead of ASCII characters
 --------------------------------------------

 The Data Source Name (DSN) is configured to the
 ForceTranslation default of 0 (No translation).  The AS/400
 attaches a language identifier or CCSID to files, tables and
 even fields (columns). CCSID 65535 is a generic code that
 identifies a file or field as being language independent:
 i.e. hexadecimal data. By definition, no translation is
 performed by the ODBC driver. If you do not wish to update
 the CCSID of the file, then translation to the default ascii
 code page can be forced.

  -  For V3R1 CA/400, edit the ODBC.INI and change
     ForceTranslation to 1
  -  For V3R11 or later CA/400, use the ODBC Administrator
     to change the ForceTranslation option to 1.

 General Protection Fault
 -------------------------

 Windows protection violations are usually due to memory
 mismanagement
 or due to a program error.  To determine which one it is,
 remove any Memory Managers (e.g. EMM383.EXE) from CONFIG.SYS
 and run Windows with the /D&colon.FSVX parameter to isolate
 any obvious memory problems. If unable to correct the problem
 by removing TSR's (Terminate and Stay Resident programs)
 or device drivers, then contact the manufacturer of the
 application for assistance.
.
.
*** Please see II09605 for the continuation of this APAR***
*** Please see II09605 for the continuation of this APAR ***
