Unreadable strings with DOA and TClientDataset

Hello -

My Oracle tables were recently moved to a new server. The old server was running Oracle9i Database 9.2.0.7.0, and the new server is running Oracle Database 10g 10.2.0.4.0. I use Delphi 2009, DOA 4.1.2.0. I had been using the Instant Client 10.2, but recently updated to Instant Client 11.2 to see if that might solve my problem, which it didn't.

I have several applications written (in semi-production) that use TClientDataset attached to a TDatasetProvider attached to a TOracleDataset. Things worked beautifully until the tables were moved.

First, I got the message that the string fields were actually WideString fields. Ok, no problem. I changed them. But now the string fields display as garbage.

If I hook the TDataSource directly to the TOracleDataset instead of through the ClientDataset, the strings are readable. But I really don't want to do that.

I've tried changing the Preferences.ConvertUTF property on the TOracleSession, but it will not let me change it in design mode. Is that a "feature"? It always returns to cuUTF8ToUTF16.

I did try connecting using ODBC through the BDE (yuck!) and it worked fine with a ClientDataset, but I really don't want to do it that way for obvious reasons.

Any suggestions?

Teri
 
Is this a UTF8 database? If so, can you set the global variable NoUnicodeSupport (located in the Oracle unit) to True before making a connection to the database?
 
Well, I thought the new database would be the same as the old. Why would they get rid of Unicode? I don't really know.

Anyway, adding the NoUnicodeSupport=true statement to the OnCreate event for the data module did allow me to see the strings, after I manually changed them back to TStringField from TWideStringField. This will not allow me then to view the strings in design mode, I guess. At least I don't know how to set that variable for the design environment. (Forgive my ignorance).

Thanks for the help! I'm back in business.
 
Back
Top