Convert int64 to OCCI Number

When you deal with int64 by using Oracle C++ Call Interface (OCCI), you will find that there is no constructor for int64. It seems OCCI does not support int64. However, number in oracle supports up to 38 significant digits, which is greater than int64.

To convert int64 to OCCI number, you can use fromText and toText mehods of the Number class.

Another solution is to convert int64 to OCI number, then to OCCI number:

 

Reference
Overview of Numeric Datatypes

Character Set Conversion

When receiving a string by Oracle C++ Call Interface (OCCI), you may encounter an issue that some characters become ‘?’ .

For example: “好” (UTF-8 in database)  –> “?”(US7ASCII on the client side)

This may be caused by incorrect character set of OCCI. To get character set of OCCI:

To correct this issue, you can specify the character set when creating the environment.

Another solution is to set an environment variable NLS_LANG.

References
1. Character Set Migration
2. Choosing a Locale with the NLS_LANG Environment Variable

OpenSSL – Client using BIO

 

OpenSSL – Server using BIO