Jump to content

Search the Community

Showing results for tags 'occi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I create a table with a custom type like this: CREATE TYPE my_type AS VARRAY(16) OF NUMBER(3,0); CREATE TABLE my_table (id_no NUMBER(5), my_col my_type); INSERT INTO my_table VALUES (1, my_type(5,6,7)); In SQL Developer my query SELECT my_col FROM my_table; yields "USER.MY_TYPE(5,6,7)", as expected. Now I connect to the database with OCCI and use the same query. Here is my minimal code: #include "occi.h"; #include <iostream> int main() { using namespace std; using namespace oracle::occi; try { Environment* env = Environment::createEnvironment(); Connection* conn = env->createConnection("user", "123", ""); Statement* stmt = conn->createStatement("select my_col from my_table"); Statement::Status status = stmt->execute(); env->terminateConnection(conn); Environment::terminateEnvironment(env); } catch (SQLException &e) { cout << e.what(); } cin.get(); return 0; } But the execute() method crashes by reading from a null-pointer. No exception is thrown. This happens only for selecting columns with custom types like VARRAY and OBJECT. All pointers in my code are not null and oracommon12.dll (windows), where the violation comes from, provides no debug information to look inside stmt. Am I doing something wrong here? How can I receive the data in my_col with OCCI? I am using OCCI ver. 12.2.
×