c++ - How to SELECT whole table with OTL, and save it to file? -


Here's the problem, I do not know how many properties are or how the table has the attributes and I need a simple selection statement. : Selection * from tab 1;

Please help.

  otl_stream i (50, //). Buffer size "from test_tab, where f1> =: f> int> and f1 and lt; =: f * 2", // SELECT statement db // connect object); Int ac = 0; Four BC [64]; Mammateset (BC, 0, 64); While (! I.eof ()) {i & gt; & Gt; AC & gt; & Gt; BC; Cout & lt; & Lt; "Booo" & lt; & Lt; AC & lt; & Lt; "" & Lt; & Lt; Bc & lt; & Lt; Endl; }  

This is the example where I know how many qualities are and how are they, but what if I do not know ??

You should ask a file stream and functions with OTL looping on the AOF check of OTL stream. While doing, you can loop at the end of the line check for each line, and send the value of each attribute in the file stream from the OTL stream. After each end of the line check, send your line break code in the file stream Setting all column types to str You must allow only one variable to process all attribute values ​​in a row.

Examples from OTL docs show how to use the set_all_column_types function you must first create a stream, set the option, then open the stream. If you make the stream and open at the same time, then it will not work.


Comments