set_all_column_types doesn't enable string extraction
Brought to you by:
skuchin
When using the set_all_column_types method on
otl_stream, the stream extraction operator raises a
"Incompatible data types in stream operation" exception
when reading in non-character columns. The attached
sample program demonstrates the problem.
Compiler: g++ v3.1.1
OS: Linux (Red Hat v7.3 running 2.4.20 kernel)
DBMS: Oracle 9i 9.0.1.1.1
example of OTL conversion problem
Logged In: YES
user_id=427100
You have to set_all_column_types before open otl_stream:
///////////////////////////////////
otl_stream sql;
sql.set_all_column_types (otl_all_num2str | otl_all_date2str);
sql.open (1, "select 12345, 'foo', sysdate from dual where :
f<int> = 1", conn);
///////////////////////////////////
Logged In: NO
You are entirely correct! Once updated, the SQL works as
expected. Thanks for your time on this.
Steve