SQLOverrideCCSID400()--Override SQL CLI CCSID for IBM PASE for i


  Syntax
 #include <as400_protos.h>

 int SQLOverrideCCSID400(int newCCSID);  

  Default Public Authority: *USE

  Library: IBM PASE for i SQL CLI Library (libdb400.a)

  Threadsafe: Yes

Note: This function can only be used in an IBM® i PASE program. See the IBM PASE for i topic collection for more information about creating IBM PASE for i programs.

The SQLOverrideCCSID400() function allows an IBM PASE for i program to specify a Coded Character Set Identifier (CCSID) used to convert character data arguments and results on IBM PASE for i SQL Call Level Interface (CLI) functions.


Parameters

newCCSID
(Input) Specifies the CCSID used for IBM PASE for i SQL CLI functions.

Authorities

No special authorities required.


Return Value

The function result is zero for success, or -1 for an error that is further qualified by an errno value.


Error Conditions

At least these errno values can be returned:

[EINVAL] The conversion between newCCSID and the IBM i job default CCSID is not supported.

[ENFILE] A converter could not be opened because the maximum number of files in the system are already opened.

[EMFILE] A converter could not be opened because the maximum number of files are already opened.


Usage Notes

  1. The system automatically converts character arguments and results between the CCSID of the job or database field and a CCSID used for IBM PASE for i SQL CLI functions that defaults to the IBM PASE for i CCSID value in effect when the first IBM PASE for i SQL CLI function is called. You must call SQLOverrideCCSID400 before any other IBM PASE for i SQL CLI function, or it will have no effect on CCSID conversions.


API introduced: V4R5

[ Back to top | IBM PASE for i APIs | APIs by category ]