Hi everyone
When I test the latest version of the ODP components(Oracle.ManagedDataAccess.Dll Version:4.121.2.20160624) and found a problem,The presence of missing data query results.
Step1.In the database to create table "Test1",“Test2”(Just to verify that the problem no practical meaning)
Test1 colInfo
Name | Type
|
---|
ID | varchar2(36) |
Name | varchar(255) |
T2ID | varchar(36) |
Age | number |
Test1 RecordInfo
ID | Name
| T2ID
| Age
|
---|
1 | jacky | 1 | |
2 | sofia | 1 | |
3 | micky | 1 | |
Test2 colInfo
Name | Type
|
---|
ID | varchar2(36) |
Age | number |
Test2 RecordInfo
Step2.C# Code
string sql = "select t1.name,t1.age,t2.age from TEST1 t1 ,test2 t2 where t2.id = t1.t2id";
OracleConnection dbConn = new OracleConnection(dbConnStr);
dbConn.Open();
DataTable dt = new DataTable();
OracleCommand oracleCommand = new OracleCommand(sql, dbConn);
OracleDataAdapter da = new OracleDataAdapter(oracleCommand);
da.Fill(dt); //DataTable Missing Data
Correct Results
Name | AGE | AGE |
---|
jacky | | 18 |
micky | | 18 |
sofia | | 18 |
Error Results
Name | AGE | AGE |
---|
jacky | | 18 |
micky | | 18 |
sofia | | |
Look forward to your reply,Thanks.