B
Brad Isaacs
ASp.NET 2.0 , Visual Studio 2005
I am working with the Add NEw Item >> DataSet
I have created my Dataset and call it, when I run my project, I receive an
error message because the dataset is pulling a DBNULL value.
I was suggestted to add the following IF ELSE and it makes sense to do that
:
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property SuiteFloor() As String
Get
Try
If isDbNull(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) Then
Return ""
Else
Return CType(Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn), String)
End If
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column
'SuiteFloor' in table 'aspnet_getCrownCorpData' is DBNull.", e)
End Try
End Get
Set
Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) = value
End Set
End Property
The above code looks great,
However, after saving this file >>> App_Code.91dxmfxl.1.vb and ReBuilding my
Web site, I ran into the same issue.........because it seems that the
Project runs a different file named >> App_Code.wyx3j.1.vb with the original
precompiled code and does not see my changes to the code:
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property SuiteFloor() As String
Get
Try
Return CType(Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column
'SuiteFloor' in table 'aspnet_getCrownCorpData' is DBNull.", e)
End Try
End Get
Set
Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) = value
End Set
End Property
Is there any way around this............any ideas/ suggesttions would be
greatly appreciated.
Thanks,
~Brad
ps: It just seems stupid that you cannot adjust this code.............
I am working with the Add NEw Item >> DataSet
I have created my Dataset and call it, when I run my project, I receive an
error message because the dataset is pulling a DBNULL value.
I was suggestted to add the following IF ELSE and it makes sense to do that
:
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property SuiteFloor() As String
Get
Try
If isDbNull(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) Then
Return ""
Else
Return CType(Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn), String)
End If
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column
'SuiteFloor' in table 'aspnet_getCrownCorpData' is DBNull.", e)
End Try
End Get
Set
Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) = value
End Set
End Property
The above code looks great,
However, after saving this file >>> App_Code.91dxmfxl.1.vb and ReBuilding my
Web site, I ran into the same issue.........because it seems that the
Project runs a different file named >> App_Code.wyx3j.1.vb with the original
precompiled code and does not see my changes to the code:
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Public Property SuiteFloor() As String
Get
Try
Return CType(Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn),String)
Catch e As System.InvalidCastException
Throw New System.Data.StrongTypingException("The value for column
'SuiteFloor' in table 'aspnet_getCrownCorpData' is DBNull.", e)
End Try
End Get
Set
Me(Me.tableaspnet_getCrownCorpData.SuiteFloorColumn) = value
End Set
End Property
Is there any way around this............any ideas/ suggesttions would be
greatly appreciated.
Thanks,
~Brad
ps: It just seems stupid that you cannot adjust this code.............