I have another problem with a ODAC-Dataset as a provider dataset for a ClientDataset, when updating a CLOB field inside a DLL.
I'm referring to my further problem "SmartQuery as Provider for ClientDataset can't read CLOB with UNICODE content" (http://forums.devart.com/viewtopic.php?f=5&t=32133 ).
Here I had problems reading Unicode-Data from a CLOB field.
I modified my sample app from topic 32133 to illustrate the new problem and sent it to you (@alex_p).
Summary:
When I update a CLOB-Field within a DLL with a ClientDataset, the update writes the byte representation of the UTF-16-string into the field.
Prerequisites and description:
- We are working on an ORACLE database with unicode character set (AL32UTF8).
- In the OracleSession I set
Code: Select all
OraSession.Options.UseUnicode := True;
OraSession.Options.UnicodeEnvironment := True;
Code: Select all
OraSession.DataTypeMap.AddDBTypeRule( OraClob, ftWideMemo);
- The ClientDataset has a Provider, which has a TSmartQuery as provider dataset.
- I have a DLL, where I have a TLocalConnection, ClientDataset, Provider and TSmartQuery as provider dataset.
- Important: I use AssignConnect as the method proposed by you to share Connections between exe and DLL. We use this approach
for years now and never had any problems with it.
see https://www.devart.com/odac/docs/?devar ... ssion).htm
When I update a CLOB Field with the ClientDataset within the DLL, the update writes the byte representation of the string into the field.
When I do the same update within the exe, everything is fine (Test with Button "Update in Exe").
Updating the field in the DLL with a straight ODAC-Dataset is ok too (Test with Button "Update in DLL (ODAC)")
One further note: when I don't use AssignConnect, but Assign server/username/password to the DLL-Connection (in fact I open a second
connection), then things work as expected.
But this has the coast of an additional ORACLE-Session, which is not suitable for us and for our customers.
It looks like AssignConnect eliminates the effect of the AddDBTypeRule( OraClob, ftWideMemo) command.
I work with Delphi XE2 Update 4, ODAC Version is (now) 9.6.19
Thanks in advance for your help.
With regards
Stefan "ostijo" Grosskreutz