Closed GoogleCodeExporter closed 9 years ago
Hello,
I'll try and get this one under the profiler. Thanks for reporting this issue.
Thanks
-Blake Niemyjski
Original comment by bniemyjski
on 15 Mar 2010 at 1:43
Ok, even worse, if you use the criteria class to filter records based on a
Nullable(of Smart date) you will get an exception trying to execute the SP as
the
parameter population doesn't deal with smartdate to SQL parameter conversion.
See
Exception bellow.
Message="DataPortal.Fetch failed (No mapping exists from object type Csla.SmartDate
to a known managed provider native type.) Stack Trace: at
System.Data.SqlClient.MetaType.GetMetaTypeFromValue(Type dataType, Object value,
Boolean inferLen) at System.Data.SqlClient.SqlParameter.GetMetaTypeOnly()
at
System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc)
at
System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32
startCount,
Boolean inSchema, SqlParameterCollection parameters) at
System.Data.SqlClient.SqlCommand.BuildRPC(Boolean inSchema,
SqlParameterCollection
parameters, _SqlRPC& rpc) at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, Boolean async) at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult
result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream, String method) at
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String
method) at System.Data.SqlClient.SqlCommand.ExecuteReader()
Original comment by JenasysD...@gmail.com
on 19 Mar 2010 at 1:11
Ok, I did a global change from Nullable(Of SmartDate) to Nullable(Of DateTime)
and
it's made a significant improvement on the speed of the application. I can't
event
get line item profiling against the Map() methods now, because they are so fast
(loading a 2,500 row collection). Obviously .net doesn't like consuming invalid
cast
exceptions in a WPF application.
Blake I recommend that you revert to Nullable(of SmartDate) as step one. I'm
very
happy to work with that datatype.
Original comment by JenasysD...@gmail.com
on 19 Mar 2010 at 1:48
Original comment by bniemyjski
on 19 Mar 2010 at 3:01
Original comment by bniemyjski
on 19 Mar 2010 at 3:05
Original comment by bniemyjski
on 21 Jun 2010 at 8:05
Original comment by bniemyjski
on 21 Jun 2010 at 8:06
Original issue reported on code.google.com by
JenasysD...@gmail.com
on 15 Mar 2010 at 12:52Attachments: