G
Greg Burns
I have a lot of autogenerated code (created from LLBL Gen,
http://www.sd.nl/software/) that looks similiar to this:
Dim _errorCode As SqlInt32
....
_errorCode = New
SqlInt32(CType(cmdToExecute.Parameters.Item("@iErrorCode").Value, Integer))
I am upgrading my project to VS 2005. Now, when this code executes I am
getting a run-time error where I did not before. The value of @iErrorCode
is 0, not null.
System.InvalidCastException occurred
System.InvalidCastException: Conversion from type 'SqlInt32' to type
'Integer' is not valid.
Simple fix seems to be to change the code to this:
_errorCode = CType(cmdToExecute.Parameters.Item("@iErrorCode").Value,
SqlInt32)
What has changed in VB 2005 that is causing this?
Thanks,
Greg
http://www.sd.nl/software/) that looks similiar to this:
Dim _errorCode As SqlInt32
....
_errorCode = New
SqlInt32(CType(cmdToExecute.Parameters.Item("@iErrorCode").Value, Integer))
I am upgrading my project to VS 2005. Now, when this code executes I am
getting a run-time error where I did not before. The value of @iErrorCode
is 0, not null.
System.InvalidCastException occurred
System.InvalidCastException: Conversion from type 'SqlInt32' to type
'Integer' is not valid.
Simple fix seems to be to change the code to this:
_errorCode = CType(cmdToExecute.Parameters.Item("@iErrorCode").Value,
SqlInt32)
What has changed in VB 2005 that is causing this?
Thanks,
Greg