Reputation: 253
I have an table, which includes DateTime but DateTime makes warning.ıThe warning always saysy that it assumes it UTC. In DateTime typed value there is just date, not included hours.
Why DateTime makes problem? How can I solve it?
Here is how I get the DateTime typed value from the Oracle DB.
entity1.BIRTHDAY_DATE= DateTime.Parse( oReader.GetValue(oReader.GetOrdinal("BIRTHDAY_DATE")).ToString());
I tried to put this code with value UTC,Local and Unspecified. Nothing changed.
<Interpretation>
<NormalizeDateTime LobDateTimeMode="Local" />
</Interpretation>
My code(Warning appears in ExecuteReader):
try
{
entList = new List<Entity1>();
OracleCommand cmd = new OracleCommand("SELECT * FROM TABLE", oConn);
oConn.Open();
cmd.ExecuteNonQuery();
using (OracleDataReader oReader = cmd.ExecuteReader())
{
while (oReader.Read())
{
entity1.STARTWORKDAY= DateTime.Parse(oReader.GetValue(oReader.GetOrdinal("STARTWORKDAY")).ToString());
entity1.ID= oReader.GetValue(oReader.GetOrdinal("ID")).ToString();
entity1.NAME= oReader.GetValue(oReader.GetOrdinal("NAME")).ToString();
entity1.BIRTHDAY=DateTime.Parse(oReader.GetValue(oReader.GetOrdinal("BIRTHDAY")).ToString());
**Some other codes**
}
}
}
catch (Exception ex){}
ABOUT WARNING When I try to look the scripts with toad it gives me this error:
ORA-06550: satır 8, sütun 19: PLS-00553: karakter kümesi adı tanınmıyor ORA-06550: satır 0, sütun 0: PL/SQL: Compilation unit analysis terminated
I have searched about this error but I think it's about the processor,I couldn't find any solution.
In Visual Studio it also gives another warning:
Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. CalisanBilgi
Upvotes: 1
Views: 382