Delphi 10.3 Rio, DOA 4.1.3, Oracle Instant Client 18.5
I use an OracleDataSet via a ClientDataSet.
If the data type of the table is NVARCHAR2, when DBEdit attempts to update a string whose first character is "一"(U+4E00) with ApplyUpdate, the SQL generated by the OracleDataSet becomes null and is updated with null.
This does not occur if the data type of the table is VARCHAR2.
dfm(excerpt)
source(excerpt)
OracleMonitor Output
Form1.OracleDataSet1.DMLQuery
Is there any way to solve the problem?
I use an OracleDataSet via a ClientDataSet.
If the data type of the table is NVARCHAR2, when DBEdit attempts to update a string whose first character is "一"(U+4E00) with ApplyUpdate, the SQL generated by the OracleDataSet becomes null and is updated with null.
This does not occur if the data type of the table is VARCHAR2.
dfm(excerpt)
object OracleDataSet1: TOracleDataSet
SQL.Strings = (
'SELECT TMP_TABLE.STR_1 FROM TMP_TABLE WHERE SEQ_ID = :SEQ_ID') //SEQ_ID is KEY
end
object DataSetProvider1: TDataSetProvider
DataSet = OracleDataSet1
ResolveToDataSet = True
end
object ClientDataSet1: TClientDataSet
Aggregates =
Params = <
item
DataType = ftInteger
Name = 'SEQ_ID' //KEY
ParamType = ptInput
end>
ProviderName = 'DataSetProvider1'
end
object DataSource1: TDataSource
DataSet = ClientDataSet1
end
object DBEdit1: TDBEdit
DataField = 'STR1'
DataSource = DataSource1
end
source(excerpt)
OracleSession1.LogOn;
ClientDataSet1.Params.ParamValues['SEQ_ID'] := 1;
ClientDataSet1.Active := True;
//At this point, DBEdit1 is displaying values from the database.
//Edit DBEdit1 to "一丁目"(U+4E00,U+4E01,U+76EE).
ClientDataSet1.ApplyUpdates(-1);
ClientDataSet1.RefreshRecord;
// DBEdit1 is empty.
OracleMonitor Output
Form1.OracleDataSet1.DMLQuery
update TMP_TABLE
set STR1 = null // null changed
where rowid = :doa__rowid
returning rowid into :doa__rowid
Is there any way to solve the problem?