sqlint32 to integer... really?

  • Thread starter Thread starter Paul S
  • Start date Start date
P

Paul S

I'm returning an integer from a sp in a SQL 2K database. The working VB.NET
code is:

Dim sequence As Integer = 0
' ADO.Net code
sequence = SqlInt32.op_Explicit(dr.GetSqlInt32(1)
'
Is there another way to convert an integer from the database to an integer
in .NET? Thanks.
 
I'm returning an integer from a sp in a SQL 2K database. The working VB.NET
code is:

Dim sequence As Integer = 0
' ADO.Net code
sequence = SqlInt32.op_Explicit(dr.GetSqlInt32(1)

SqlInt32 has a Value property containing the Int32 value. This will throw
an exception if the contained value is null, so be sure to check the
IsNull property before accessing it.

-Derek
 
Back
Top