Closed GoogleCodeExporter closed 9 years ago
Blake, I have a whole bunch of code in my current app like this.
If IsNumeric(BO.Property) andalso (CInt(cm.Parameters.Item("@pProperty").Value)
= 0) Then
cm.Parameters.Item("@pProperty").Value = DBNull.Value
End if
If GetType(Bo.Property) = System.String
AndAlso(cm.Parameters.Item("@pProperty").Value.ToString().Trim = String.Empty)
Then
cm.Parameters.Item("@pProperty").Value = DBNull.Value
End If
This is to handle the Nullable columns in the database. I couldn't see logic
like
this in your codegen.
Original comment by JenasysD...@gmail.com
on 24 Feb 2010 at 6:49
Attached is potential solution the includes using ADOHelper to include code
that does
basic DBNull.Value conversion. Have a look at ADOHelp.vb and Consultant.vb as
I've
added a whole series of "replacement" code to fix null data errors.
I've also attached the nunit results image. Getting close!
Original comment by JenasysD...@gmail.com
on 24 Feb 2010 at 10:05
Attachments:
Original comment by bniemyjski
on 24 Feb 2010 at 11:24
Original comment by bniemyjski
on 24 Feb 2010 at 12:04
Attached is an upgraded Nunit Test for the following location, that you can use
to
confirm changes to the templates to ensure dataportal Insert/Updates save Null
values
were possible.
Source:
Projects\Framework-Samples\Csla\VisualBasic\PetShop\Source\PetShop.Tests\PetShop
.Tests.StoredProcedures\
Original comment by JenasysD...@gmail.com
on 3 Mar 2010 at 11:46
Attachments:
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:07
Original issue reported on code.google.com by
JenasysD...@gmail.com
on 24 Feb 2010 at 6:10