Oracle Objects for OLE (OO4O) Release Notes
The latest OO4O patches and information is located at the following
site:
http://otn.oracle.com/tech/windows/ole/
Release 10.1.0.5.2
March 2005
Copyright (C) Oracle Corporation 2005
This file contains important information specific to Oracle Objects for OLE
release 5.2. The following topics are covered:
Install Notes: Oracle Objects for OLE can be installed in Multiple
Oracle Homes. However, being a COM component, only one instance can be active on
the computer. This means that the current (latest) installation renders the
previous one inactive.
System Requirements
- Operating
System: Windows NT 4.0 SP6a, Windows 2000 SP1, Windows XP, Windows 2003.
- 32-bit
application capable of OLE scripting (e.g. Visual Basic, Excel, etc.) or
supported C++ compiler (Microsoft Visual C++).
- Access
to an Oracle8i, Oracle9i or Oracle10g database
through a local connection or a network using the Net client. Oracle Net
will need to be installed when accessing the Oracle database through a
network.
- Oracle
10.1.0.2.0 client.
General Information and Dependencies
This release is a 32-bit version of Oracle Objects for OLE.
What is included in this release:
- 32-bit
In Process OLE Automation Server.
- 32-bit
Class Libraries for Microsoft Visual C++.
CPP Class
Libraries Applications build with earlier versions of OO4O will have to be
re-complied and re-linked.
- 32-bit
Oracle Data Control (.OCX).
New Features
New Features supported for the 32-bit In Process OLE Automation
Server:
With this release, OO4O enables developers to access and manipulate two new
numeric datatypes introduced in the 10i database: BINARY_FLOAT and
BINARY_DOUBLE. Instances of these types can be fetched from the database or
passed as input or output variables to SQL statements and PL/SQL blocks,
including stored procedures and functions.
OO4O allows you to bind these datatypes using the following values as defined
in the oraconst.txt:
|
Oracle
Datatype |
Constant |
Value |
|
BINARY_FLOAT |
ORATYPE_BFLOAT |
100 |
|
BINARY_DOUBLE |
ORATYPE_BDOUBLE |
101 |
New Features introduced in release 9.2.0.4.8
OO4O provides four new objects that enable developers to access and
manipulate the new datetime and interval datatypes introduced in Oracle9i.
|
OO4O Objects |
Oracle Datatypes |
|
OraIntervalDS |
INTERVAL DAY TO SECOND |
|
OraIntervalYM |
INTERVAL YEAR TO MONTH |
|
OraTimeStamp |
TIMESTAMP TIMESTAMP WITH LOCAL TIME ZONE |
|
OraTimeStampTZ |
TIMESTAMP WITH TIME ZONE |
Instances of these types can be fetched from the database or passed as input
or output variables to SQL statements and PL/SQL blocks, including stored
procedures and functions.
These new datatypes are not supported as
elements in collections such as PL/SQL Indexed Tables, VARRAYs, or Nested
Tables. Please refer to the OO4O doc for more information.
Oracle In-Process Server
XML Support
Data from LONG or LONG RAW fields are not rendered.
Data from Object or
Collection attributes of type RAW are not rendered.
Automation Error when calling OraParameters.Remove for Parameters of
Extended Type
Calling OraParameters.Remove on an OraParameter of type OraObject, OraRef,
OraCollection, OraBlob, OraClob, or OraBfile can result in an Automation error.
A workaround is to not call Remove.
Access Violation When Freeing a Temporary Lob
This bug occurs when a Temporary Lob is freed either by going out of scope or
when it is set to "nothing". The workaround is to make sure that the OraDatabase
parent of the Lob is freed AFTER the Lob.
Set OraClob = nothing
Set OraDatabase = nothing
ORA-4108 When Updating Dynasets Based on Index Organized Tables
OO4O does not currently support updating Index Organized Tables using
OraDynaset. Updates may be done with OraDatabase.ExecuteSQL method.
Using CLOB With Varying Width Character Sets -- Documentation
Corrections
Please note that the documentation for OraClob has been corrected. If you are
using CLOBs with varying width character sets, please make sure you have the
latest version of the documentation.
Additional corrections:
OraClob.Write
The chunksize
argument is given in characters.
When OraLob.Pollingamount = 0 but piecetype on OraLob.Write is
not ORALOB_ONE_PIECE, polling will still occur. Polling will complete when
ORALOB_LAST_PIECE is sent as an argument to a call toWrite. This is especially
useful when calling OraClob.Write in a varying width character set when counting
the total amount of characters ahead of time may be costly.
OraParameter Values Return Null Variant Instead of Empty String
As a part of an earlier bug fix, OraParameter.Value will now return a variant
of type Null to correspond to database Null values whereas in some previous
cases it had returned an empty string (which was a bug). Now, if you set a
string variable equal to OraParameter.Value and Null is returned, Visual Basic
will give an error because you cannot set a string variable to Null. Use a
variant instead.
Methods Beginning with Prefix "Db" Removed from Documentation
Methods that begin with the prefix "Db" have been removed from the
documentation (such as OraSession.DbOpenDatabase)
but will continue to be
supported for backward compatibility. The same method without the "Db" prefix is
exactly the same.
ORA-12704 with NCHAR or NVARCHAR2 Data Types
NCHAR and NVARCHAR2 datatypes are not supported in this release. The error
"character set mismatch" is likely if operations are attempted on these types.
LOB columns with Dynaset with ORADYN_ORAMODE
Adding LOB columns in a dynaset created with ORADYN_ORAMODE option does
not work with this release.
Lob, Objects, REF, Collections Dirty Writes
With all other column types, when you attempt to do an update, and the value
of the field has been changed by another user, you receive an OIP-4119 "Data Has
been Changed" error. This error will not occur with BLOB and CLOB, Object ,REF
and collection types and the data will be updated regardless.
ORADB_NOWAIT Option of OpenDatabase
The effect of this option differs significantly from its behavior in version
2.3. It now only applies to OraDynaset. It no longer has any effect on
OraSqlStmt objects or ExecuteSQL calls. Also, it now only gives an error in the
case of a locked row (in 2.3 it gave an error when there was *any* database
resource contention no matter how brief, which was generally disruptive).
ChunkSize for LONG, LONG RAW columns
The ChunkSize can be less than or equal to 65280 bytes and not 64K as
mentioned in the online documentation. This is true for all the chunking methods
GetChunk, GetChunkByte, GetChunkByte , GetChunkByteEx and ReadChunk.
Behavior of MoveTo, MoveRel, Movexxxxn
MoveTo:
The behavior of this method is correct but the documentation does not make
clear how this method behaves: Row numbers are static between refreshes. They
are very much like a row id. Row numbers are not dynamically reassigned after
deletions. Therefore if you do a MoveFirst followed by a MoveTo 4, you will end
up at the same row, whether or not rows 2 and 3 have been deleted. So, you
should not do arithmetic based on values of row numbers unless you can guarantee
no row has been deleted (such as immediately after a refresh). That is, you
cannot be sure how far apart row 1 and row 4 are in terms of valid (non-deleted)
rows. The row number simply serves as a label or id and its actual value is
meaningless in terms of relative position whenever rows have been deleted.
MoveRel, Movexxxxn
These methods do not work correctly when rows have been deleted. They
incorrectly add the offset you provide to the value of the row number and move
there (or to the next available valid row in the case where the resulting row
has been deleted). Unless you can guarantee that no row has been deleted (such
as immediately after a refresh) these methods should probably not be used.
Instead, use a loop of MoveNext or MovePrev to achieve the same results.
Find Methods
- The
like operator will not work in multi-byte languages.
- Table
or synonym 'DUAL' is required in user's schema.
- Date
values are retrieved and compared in VB format which is actually the format
specified in the Control Panel. Therefore date comparisons will fail if any
other format such as the default Oracle format 'DD-MON-YYYY' is used.
- SQL
function TO_CHAR(date, fmt) cannot be used because the first argument must be
a date in native Oracle format and OO4O only handles 'string dates'.
- SQL
function TO_DATE will convert a string to a date, but the OIP will convert it
back to a string in VB format as described above and the comparison may still
fail.
- FindPrevious
and FindLast in a NO_CACHE dynaset will not work; NoMatch will be set TRUE.
Oracle Class Libraries
Using CLOB With Varying Width Character Sets -- Documentation
Corrections
Please note that the documentation for OraClob has been corrected in a recent
version. If you are using CLOBs with varying width character sets, please make
sure you have the latest version of the documentation.
Additional corrections:
unsigned long OClob::Read
buffersize - in bytes if streaming is enabled, characters otherwise
offset - in characters
return value -- in bytes read
void OClob::CopyToFile
File will be in the same format as the NLS_LANG setting.
void OClob::CopyFromFile
File should be in the same format as the NLS_LANG setting.
Access Violation on Program Termination, after OShutdown()
If OShutdown() is called and then a program exits, any OO4O objects that are
on the stack will be deleted by the compiler generated cleanup code. When OO4O
objects are deleted, Release() is called on the associated OIP COM object. If
COM is already shut down, this can result in an access violation. So in these
cases, the user should either call Close() on each object on the stack prior to
calling OShutdown() (or Clear() in the case of an OValue that contains an
object), or since the program is terminating anyway, neglect calling OShutdown()
at all. Note that it is not required to call Close() on OO4O objects, this is
taken care of automatically when they are deleted. In this special case however,
it is neccesary to make sure the Close() happens before the OShutdown.
Example:
main()
{
OSession sess;
ODatabase db;
OValue val;
OStartup();
db.Open(sess, "exampledb", "scott", "tiger", 0);
sess.Close();
db.Close();
oval.Clear(); //only needed if OValue can
contain an object
OShutdown();
}
Additional support for RAW datatype
Additional methods were added to the C++ library to enable support for the
RAW datatype:
ODynaset:
oresult GetFieldValue(int index, char *val, unsigned short
maxlen, unsigned short *outlen) const;
oresult GetFieldValue(const
char *fieldname, char *val, unsigned short maxlen, unsigned short
*outlen) const;
oresult SetFieldValue(int index, const char *val, int
len);
oresult SetFieldValue(const char *fieldname, const char *val,
int len);
OField:
oresult GetValue(const char **val, int *len) const;
oresult SetValue(const char *val, int len);
OParamArray:
oresult GetValue(const char **val, int *len, int
index) const;
oresult SetValue(const char *val, int len, int index);
OParameter:
oresult GetValue(const char **val, int *len) const;
oresult SetValue(const char *val, int len);
OParameterCollection:
OParameter Add(const char *name, const char *value,
int len, int iotype, int serverType);
Example code is provided in the \ORACLE_HOME\OO4O\CPP\WORKBOOK\RAW
directory.
Error when attempting to link with ORACLM32.LIB
Recent releases of the C++ Class Library ship with an ORACLM32.LIB that will
not be recognized by linkers earlier than VC++ 6.0.
OStartup with ApartmentThreaded (default) option
When calling OStartup from C++ Class library without the
OSTARTUP_MULTITHREADED option,
connections with same username, password, and
connect alias are shared. This is to insure backward compatibility with version
2.3 and before.
Using the data control with
VC++
An error condition will cause an exception in MFC42.DLL. For example, while
running a VC++ application with the data control, an invalid data input that
should otherwise generate an OIP error, will cause an unhandled exception in
MFC42.DLL.
IIS/ASP
IIS
In IIS you need to use the <OBJECT> tag for instantiating OO4O.
<OBJECT RUNAT=Server
SCOPE=Application ID=OraSession
PROGID="OracleInProcServer.XOraSession"></OBJECT>
You can then access the OraSession object by simply referring to it without
using the Application("OraSession") syntax. The SCOPE=Application takes care of
it.
The following is a sample global.asa file.
<OBJECT RUNAT=Server
SCOPE=Application ID=OraSession
PROGID="OracleInProcServer.XOraSession"></OBJECT>
<SCRIPT LANGUAGE=VBScript
RUNAT=Server>
Sub Application_OnStart
End Sub
Sub
Application_OnEnd
End Sub
</SCRIPT>
Reading Long/Long raw columns in ASP
You have to use OraField object's method GetChunkByteEx to read Long/Long raw
columns from ASP. See the online help for more information. Oracle recommends
that you use LOBs instead.
There may be data display issues when multiple edit controls are bound to the
Oracle Data Control. As a workaround please use Rich text control instead.
Summary of problems fixed in 10.1.0.5.2
None
Summary of problems fixed in
10.1.0.5.1
3893260 - ASP Page using OO4O hangs if reloaded after database has been
shutdown.
3850180 - Over long period : Memory leak monitoring AQ with
asynchronous notification.
3824536 - Adding three or more parameters and not
calling remove method causes GPF on exit.
3712862 - OO4O Leaks memory in
opendatabase with Enlist MTS option under COM+ transaction.
3627420 - Memory
leak when monitoring AQ via OO4O with asynchronous notification.
3568386 -
Access violation using the aqgent class in the COM implmentation of
OO4O.
3522652 - Cannot change Date format in OraObject of Date.
3487477 -
method 'CREATEPLSQLDYNASET' of Object '_ioradatabase' failed" error
occurs.
3456338 - OO4O Class Library app can not close Server BFILE until
call CloseAll() method.
3452576 - Orphaned Critical Section causing
intermittent IIS hanging.
3281378 - OO4O Version 9.2.0.4.8 causing dumps in
IIS.
3041539 - Execute Procedure in ExecuteSQL with null ref cursor param
fails with ORA-24338.
2824901 - OIP-4126 error occurs when the value of empty
is put into oraparamarray.
2786306 - ORABLOB.WRITE - last element in the
buffer is not being written.
2779744 - OraParameter can't handle a value of
an element of SAFEARRAY.
2516158 - Using ORADATABASE.CreateSQL in asynch
mode produces ORA-24333.
2433386 - OIP-00000: Message 0 not found; when
deleting the last row using data control.
Summary of problems fixed in 10.1.0.5.0
3254960 - ADDNEWRECORD() METHOD ON ODYNASET OPENED WITH ODYNASET_NOCACHE
OPTION CAUSES MEMORY LEAK
3205954 - GETFIELDVALUE METHOD CAUSES DELAY ON
MULIT-THREADED APPLICATION
3149198 - WRONG RESULT RETURNED WHEN USING
CREATECUSTOMDYNASET AND MOVELAST
3133433 - VARCHAR2 BIND VARIABLE IN TABLE OF
OBJECT IS BEING PASSED INCORRECTLY
3125350 - OO4O CALL INVALID OLNG() WHEN
CLIENT NLS_LANG IS UTF8
2951102 - OCOLLECTION.GETVALUE ON OBJECTS LEAKS
MEMORY