📄 otl3_whatn.htm
字号:
NUMBERs. <br>
<br>
As I understood the mechanism, when you bind a <double> as
SQLT_BDOUBLE with, say, NUMBER or BINARY_DOUBLE, or with any other
numeric type, a <double> value gets sent across the wire /
SQL*Net as is, as opposed to a <double> value would be converted
into some wire format by the OCI, if the <double> variable is
bound as SQLT_FLT (sizof(double)),. In the latter case the conversion
loses the 16th and the 17th decimal significant digits (aka roundup).<br>
<br>
The bug has been fixed in this release. When #define OTL_ORA10G or
#define OTL_ORA10G_R2 is defined, <float> and <double> get
bound as SQLT_BFLOAT and SQLT_BDOUBLE respectively, which provides
better precision.<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (int OTL 4.0.155):<br>
<br>
<ul>
<li>Under #define <a
href="otl3_compile.htm#OTL_ORA_TIMESTAMP">OTL_ORA_TIMESTAMP</a>, OTL <a
href="otl3_compile.htm#OTL_TRACE">tracing</a> didn't trace Oracle
TIMESTAMP / DATE values. The bug is fixed in this release.<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.154):<br>
<br>
<ul>
<li>Oracle 10G R2 (10.2) introduced the following bug:<br>
<br>
<span style="font-family: monospace;">When a 'alter session
set NLS%' statement is first executed in parse only mode and then in
normal mode, the setting changed does not get reflected. </span>Bug #
in <a href="http://metalink.oracle.com">metalink.oracle.com</a> is
4904743. Oracle promised to fix the bug in Oracle 11g.<br
style="font-family: monospace;">
<br>
OTL used PARSE ONLY to implement otl_connect::<a
href="otl3_connect_class.htm#syntax_check">syntax_check</a>(), and
PARSE ONLY + normal mode for direc_exec() functions. So, the bug broke
the OTL logic for 'alter session set NLS%' commands. This release works
around the bug.<br>
<br>
</li>
<li>This release introduces native support for <a
href="http://www.oracle.com/timesten/index.html">TimesTen</a> via the
following new #defines<a href="otl3_compile.htm#OTL_ODBC_TIMESTEN_WIN">:
OTL_ODBC_TIMESTEN_WIN</a>, <a
href="otl3_compile.htm#OTL_ODBC_TIMESTEN_UNIX">OTL_ODBC_TIMESTEN_UNIX</a>.
Code <a href="otl4_t10_examples.htm">examples</a> for TimesTen have
been updated to reflect the new feature.<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.153):<br>
<br>
<ul>
<li>OTL compiles clean with the latest G++ (GCC 4.2)</li>
<li>OTL compiles clean with Visual C++ 2005 (version 8.0)
without disabling warning C4996: <span style="font-family: monospace;">#pragma
warning (disable:4996)</span>. Old C string functions have been
replaced with more secure VC++ 8.0 string functions (for example,
strcpy_s(), strcat_s(), sprintf_s()) whenever possible, without
breaking the existing design too much. Of course, the new string
functions get enabled only when OTL is being compiled with VC++ 8.0.</li>
<li>Actual code <a href="otl4_examples.zip">examples</a>
have been reworked to compile clean with Visual C++ 8.0.<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.152):<br>
<br>
<ul>
<li>A bug was reported that OTL 4.0.147 - OTl 4.0.151 broke <a
href="otl3_bind_variables.htm#access_qualifiers">inout</a> bind
variables' behavior. The actual problem was that when NULL gets written
into an inout variable, the OTL stream's internal NULL indicator
doesn't get set to non-NULL on the output in case if the variable
receives a non-NULL value from the database. The bug was
introduced by an optimization tweak in OTL 4.0.147, and fixed in
this release.<br>
<br>
</li>
<li>(Updated): There is an open source ODBC driver for
Linux/Unix/Windows for accessing MS SQL 7.0 / 2000 / 2005 and Sybase
10.x / 11.x / 12.x / 15.x:. It's called <a href="http://freetds.org/">FreeTDS</a>.
At this point time, the FreeTDS ODBC driver (version 0.63) is high
enough quality to work with OTL. The following FreeTDS based sets of
code examples have been added: <a
href="otl4_mssql_freetds_examples.htm">MS SQL Server / FreeTDS ODBC,</a>
<a href="otl4_sybsql_freetds_examples.htm">Sybase
SQL Server / FreeTDS ODBC</a>. <br>
<br>
FreeTDS ODBC supports the bulk interface, calls to stored procedures,
etc. It doesn't support some features that are supported by the native
MS SQL and Sybase ODBC drivers, but for a free ODBC driver, it's good
enough performance-wise, and feature-wise. And it provides access
to MS SQL from Linux / Unix. Sybase native ODBC driver is available for
Windows and Linux. So, FreeTDS ODBC can be used for accessing Sybase
from Solaris and AIX (or any other supported platform that FreeTDS
supports). In non-Windows platforms, FreeTDS ODBC can be used with <a
href="http://www.unixodbc.org">unixODBC,</a> or<a
href="http://iodbc.org/"> iODBC</a>.<br>
<br>
</li>
<li>(Updated):<a href="otl4_t10_examples.htm">TimesTen code
examples</a>
have been tested against <a
href="http://www.oracle.com/technology/products/timesten/index.html">TimesTen</a>
7.0.<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.151):<br>
<br>
<ul>
<li>This release introduces better support for MS SQL Server
2005 via the following new define: #define <a
href="otl3_compile.htm#OTL_ODBC_MSQL_2005">OTL_ODBC_MSSQL_2005</a>.
The main difference between OTL_ODBC and OTL_ODBC_MSQL_2005 is that the
latter has <a href="otl3_lob_stream.htm">otl_lob_stream</a> support
for VARCHAR(MAX), VARBINARY(MAX), and NVARCHAR(MAX). Examples for <a
href="otl4_mssql_examples.htm">MS
SQL Server / ODBC</a> and <a href="otl4_mssql_unicode_examples.htm">MS
SQL Server Unicode / ODBC </a>have been updated. For more
detail, see examples <a href="otl4_ex497.htm">497</a>, <a
href="otl4_ex498.htm">498</a>, <a href="otl4_ex499.htm">499</a>, <a
href="otl4_ex500.htm">500</a>, <a href="otl4_ex501.htm">501</a>.</li>
<br>
<br>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.150):<br>
<br>
<ul>
<li>A problem was reported that OTL throws an "Invalid
Handle" (OCI) exception when a PL/SQL block / stored procedure returns
an uninitialized CLOB / BLOB locator, and when the CLOB / BLOB is being
written to / read from via an <a href="otl3_lob_stream.htm">otl_lob_stream</a>.
To address the problem, a new function has been added to the lob stream
class: i<a href="otl3_lob_stream.htm#is_initialized">s_initialized</a>().<br>
<br>
</li>
<li>This release introduces support for Oracle UTF8 via the
following new #define: #define <a href="otl3_compile.htm#OTL_ORA_UTF8">OTL_ORA_UTF8</a>.
See also examples for <a href="otl4_ora9_utf8_examples.htm">Oracle 9i,
UTF8</a>, and <a href="otl4_ora10_utf8_examples.htm">Oracle 10g, UTF8</a>.<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.149):<br>
<br>
<ul>
<li>A memory leak was reported in <a
href="otl3_stream_class.htm">otl_stream</a>, which turned out to be a
call to otl_stream::open() in a loop without a matching call to
otl_stream::close(). In order to simplify debugging of problems
like
that, this release introduces the following two new OTL defined
exceptions:<br>
<br>
<ul>
<li>code <a href="otl3_exc_list.htm#32030">32030</a>,
otl_stream is already open</li>
<li>code <a href="otl3_exc_list.htm#32031">32031</a>,
otl_connect is already connected<br>
<br>
</li>
</ul>
</li>
<li>DB2 zOS does not normally release row locks on a SELECT
statement, even after all the rows were already fetched, and even the
underlying cursor was closed. In order to release the row locks, the
SELECT statement has to be "committed" with an explicit
otl_connect::commit() call. The thing gets worse when on the DB2 zOS
side, a timeout on "inactive DB2 threads that lock resources" is set,
which results in a forced disconnect. DB2 CLI manual recommends to
explicitly set the SQL statement's SQL_ATTR_CLOSE_BEHAVIOR attribute to
SQL_CC_RELEASE (read locks are released), in which case the DB2 server
attempts to release read locks. No guarantees, of course. <br>
<br>
This release sets the SQL statement's attribute to the recommended
value in case if the SELECT statement's isolation level was either
uncommitted read (UR), or cursor stability (CS, aka "read committed"). <br>
<br>
</li>
<li>In this release, for DB2 CLI, all calls
to SQLFreeStmt(hstmt,SQL_CLOSE) were replaced with
SQLCloseCursor(hstmt).
The difference between the two types of calls is that the latter will
return a DB2 CLI error if the call is made on a closed cursor.
SQLFreeStmt(hstmt,SQL_CLOSE) will return a "success". This was done in
order to simplify debugging of potential problems with cursor
management.<br>
<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.148):<br>
<br>
<ul>
<li>#define <a
href="otl3_compile.htm#OTL_TRACE_ENABLE_STREAM_LABELS">OTL_TRACE_ENABLE_STREAM_LABELS</a>.
When this #define is enabled, OTL trace records SQL statement labels
instead of the bodies of the SQL statements. It is useful for reducing
the size of the OTL trace.<br>
<br>
</li>
<li>#define <a
href="otl3_compile.htm#OTL_NO_TMPL_MEMBER_FUNC_SUPPORT">OTL_NO_TMPL_MEMBER_FUNC_SUPPORT</a>
was introduced in OTL <a href="#OTL40127">4.0.127</a>. The problem was
reported that Visual C++ 7.0 (2002) does not support / has a bug in
template member functions. The OTL header file will automatically
enable the #define for Visual C++ 7.0 from this release and on. Visual
C++ 7.1, and 8.0 do not have the same problem / bug. <br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.147):<br>
<br>
<ul>
<li>Internal code cleanup. Also, otl_stream::<a
href="otl3_stream_class.htm#flush">flush</a>()
function has been optimized by 2-2.5%. Mileage may
vary from one C++
compiler to another.<br>
<br>
</li>
<li>Following new #defines have been introduced: <span
style="font-weight: normal;"><small><small><span
style="font-family: monospace;"><a
href="otl3_compile.htm#OTL_ORA7_TIMESTAMP_TO_STRING">OTL_ORA7_TIMESTAMP_TO_STRING</a>,</span></small></small></span><a
href="otl3_compile.htm#OTL_ORA7_STRING_TO_TIMESTAMP"><span
style="font-weight: normal;"><small><small><span
style="font-family: monospace;"></span></small></small></span><span
style="font-family: monospace;">OTL_ORA7_STRING_TO_TIMESTAMP</span></a>.
<br>
The #de<span style="font-weight: normal;">fines should be used when
there is a need to use OCI7 and Oracle 9i/10g TIMESTAMPs in order to
enhance legacy applications. See also example <a href="otl4_ex473.htm">473</a>.<br>
<br>
</span></li>
<li><span style="font-weight: normal;"><a
href="otl4_sqlite_examples.htm">Examples</a> for <a
href="http://sqlite.org">SQLite</a> have been updated to match what's
available in SQLite 3.3.x, and <a
href="http://www.ch-werner.de/sqliteodbc/">SQLite ODBC </a>driver
0.71.<br>
</span><br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.146):<br>
<br>
<ul>
<li>OTL/ODBC didn't compile with the <a
href="http://www.enea.com/templates/Extension____259.aspx">Polyhedra</a>
ODBC header files. The bug has been fixed in this release.<br>
<br>
</li>
<li>Description of #define <a
href="otl3_compile.htm#OTL_ODBC_POSTGRESQL">OTL_ODBC_POSTGRESQL</a> as
well as the PostgreSQL <a href="otl4_postgresql_examples.htm">examples</a>
have been changed.<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -