Puedes hacerlo de 2 formas:
1.-
Cita: If Not oCmd.ExecuteScalar Is DBNull.Value Then
iTotal = oCmd.ExecuteScalar + 1
End If
...
...
y la segunda:
Cita: Dim sTotal As String
Dim iTotal As Integer
oConn.Open()
sTotal = Convert.ToString(oCmd.ExecuteScalar)
If sTotal <> "" Then
iTotal = CType(sTotal, Integer) + 1
End If
...
oConn.Close()
Salu2