1 2 3 4 5 6 7 8 9 10 11 12
| Public Function GetDataTable(ByVal CommandType As System.Data.CommandType, ByVal CommandText As String, ByVal ParamArray CommandParameters() As System.Data.SqlClient.SqlParameter) As System.Data.DataTable
'Récupération des résultats
Dim dsResults As System.Data.DataSet = Me.GetDataSet(CommandType, CommandText, CommandParameters)
'Vérification du DataSet et des DataTable
If Not dsResults Is Nothing AndAlso dsResults.Tables.Count > 0 Then
Return dsResults.Tables(0)
Else
Return Nothing
End If
End Function |
Partager