lunes, 27 de octubre de 2008

Public Function GetDataRow(ByVal strSql As String) As DataRow

Public Function GetDataRow(ByVal strSql As String) As DataRow

'Dim daSelect As New OracleClient.OracleDataAdapter(strSql, strConnectionString)
Dim daSelect As New SqlClient.SqlDataAdapter(strSql, strConnectionString)
Dim dsDatos As New DataSet
daSelect.Fill(dsDatos, "Tabla")
daSelect.Dispose()

If dsDatos.Tables.Count > 0 Then
If dsDatos.Tables(0).Rows.Count > 0 Then
Return dsDatos.Tables(0).Rows(0)
Else
Return Nothing
End If
Else
Return Nothing
End If

End Function

No hay comentarios: