Page 1 of 1

Year, Month, and Day parameters describe an un-representable

Posted: Wed 13 Aug 2008 11:15
by markaw
Hi,

I get the following exception while reading a Date field from Oracle. What can I do with this?

CoreLab.Oracle.OracleException was unhandled
Message="Year, Month, and Day parameters describe an un-representable DateTime."
Source="CoreLab.Oracle"
ErrorCode=-2147467259
Code=-1
Offset=0
StackTrace:
at CoreLab.Oracle.OracleDate.b(Byte[] A_0, Int32 A_1)
at CoreLab.Oracle.ah.i(Byte[] A_0, Int32 A_1, Int32 A_2)
at CoreLab.Oracle.c.i(Byte[] A_0, Int32 A_1, Int32 A_2)
at CoreLab.Oracle.OracleDataReader.GetDateTime(Int32 i)
at CoreLab.Oracle.Entity.a.a.a.a(Int32 A_0)
at CoreLab.Common.Entity.c.a.a.GetValue(Int32 ordinal)
at System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)
at System.Data.Common.Internal.Materialization.Shaper.GetPropertyValueWithErrorHandling[TProperty](Int32 ordinal, String propertyName, String typeName)
at lambda_method(ExecutionScope , Shaper )
at System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
at lambda_method(ExecutionScope , Shaper )
at System.Data.Common.Internal.Materialization.Coordinator`1.Read(Shaper shaper)
at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at System.Data.Objects.ELinq.ObjectQueryProvider.b__0[TResult](IEnumerable`1 sequence)
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.First[TSource](IQueryable`1 source)
at EFTest2.Program.Main(String[] args) in C:\Documents and Settings\marcin\My Documents\Visual Studio 2008\Projects\EFTest2\EFTest2\Program.cs:line 14
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Regards,
Mak

Posted: Wed 13 Aug 2008 12:22
by AndreyR
Please provide us with the DDL and DML script of your table(s).
Also please send us some piece of the code you use for reading data or a small test project.

Posted: Wed 13 Aug 2008 12:38
by markaw
Hi,

I use Entity Framweork:




















































Hier is how do I read the data:

Model.Entities ent = new Model.Entities(connStr);
var o2 = (from e in ent.PERSON select e).First();
Console.WriteLine(o2.SYSPERSON);

Regards,
Mak

Posted: Wed 13 Aug 2008 14:01
by AndreyR
Sorry, but that is not enough. Please provide us with data you are trying to get from the server (in form "INSERT INTO PERSON VALUES (sysperson, identam)"). Also please tell us your Oracle version.

{"Year, Month, and Day parameters describe an un-representab

Posted: Thu 08 Apr 2010 16:13
by David Koizkowski
Getting this when trying to use the Entity Framework under Visual studio 2008
I'm using Dot Connect 5.6.0 Pro

Posted: Fri 09 Apr 2010 14:41
by AndreyR