Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODP.net ZHS16GBK Special characters ,error #400

Closed
crisoe7 opened this issue Aug 1, 2024 · 3 comments
Closed

ODP.net ZHS16GBK Special characters ,error #400

crisoe7 opened this issue Aug 1, 2024 · 3 comments
Labels
Milestone

Comments

@crisoe7
Copy link

crisoe7 commented Aug 1, 2024

Oracle version:19c
Oracle NLS_CHARACTERSET:ZHS16GBK
ODP.net version: 21.15.0 & 12.2.1100
Execute script: Insert Into tblTemp (Col1, Col2, Col3,Col4) Values('9','密','Ø2*Ø1','M');

DB character:ZHS16GBK
Dll:Oracle.ManagedDataAccess.dll

An error will occur as long as there is an Ø character
The test uses the same script of Toad For Oracle & SQL Developer to run normally.

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00917: 遺漏逗號 Missing comma
於 OracleInternal.ServiceObjects.OracleConnectionImpl.VerifyExecution(Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, SqlStatementType sqlStatementType, Int32 arrayBindCount, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
於 OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, OracleConnection connection, OracleLogicalTransaction& oracleLogicalTransaction, Boolean isFromEF)
於 Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery()

@alexkeh
Copy link
Member

alexkeh commented Aug 1, 2024

What is your middle-tier/client NLS_LANG setting? Are you using managed ODP.NET? The ZHS16GBK character set is the DB character set, correct?

If you try to execute the same INSERT from the same machine using another client, such as SQL Developer or JDBC, do you see the same error?

A similar issue was reported before. The problem was a character set conversion incompatibility in that case.
#185 (comment)

@crisoe7
Copy link
Author

crisoe7 commented Aug 2, 2024

What is your middle-tier/client NLS_LANG setting? Are you using managed ODP.NET? The ZHS16GBK character set is the DB character set, correct?

If you try to execute the same INSERT from the same machine using another client, such as SQL Developer or JDBC, do you see the same error?

A similar issue was reported before. The problem was a character set conversion incompatibility in that case. #185 (comment)

Yes, DB character is ZHS16GBK
Using Oracle.ManagedDataAccess.dll
The test uses the same script of Toad For Oracle & SQL Developer to run normally.

Code:
Environment.SetEnvironmentVariable("NLS_LANG", "AMERICAN_AMERICA.ZHS16GBK");
MessageBox.Show($"Current NLS_LANG: {Environment.GetEnvironmentVariable("NLS_LANG")}");
But the same error occurs

1
2
3
4

@alexkeh alexkeh added the bug label Aug 10, 2024
@alexkeh
Copy link
Member

alexkeh commented Aug 10, 2024

The Oracle DB globalization dev team has identified the root cause of this bug. The issue is being tracked with bug 36937681.

@alexkeh alexkeh added this to the ODP.NET 23.6 milestone Sep 4, 2024
@alexkeh alexkeh closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants