The latest OO4O patches and information is located at the following
site:
http://otn.oracle.com/tech/windows/ole/
Release 11.2.0.4.0 Production
Copyright (C) Oracle Corporation 2013
This file contains important information specific to Oracle Objects for OLE. 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.
During the OUI install, do not uncheck "Oracle Instant Client" on the "Available product Components" screen if you do not already have an Oracle 11gR2 client installed. Otherwise, the installation will fail with errors and the products will not work correctly later on.
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.
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.
ChunkSize for LONG, LONG RAW columns
The ChunkSize can be less than or equal to 65280 bytes and not 64K as mentioned in the 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 if 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
Additional corrections:
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 shutdown, 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.
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, which should otherwise generate an OIP error, will cause an unhandled exception in MFC42.DLL.
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 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.
3771007 - ORA-01480 OCCURS WHEN CALLING ORASQLSTMT.REFRESH METHOD
5851779 - ORAPARAMETER.ADDTABLE METHOD SET ORATYPE_LONGRAW FAILES WITH OIP-04126
6181036 - USING OS AUTHENTICATED LOGINS WITH OO4O FAIL WITH ORA-01017