loDataProvider.ParameterAdd("Numero", oProcess.nNoMember) loDataProvider.ParameterAdd("Session3", oProcess.cSession2) If Not loDataProvider.SQLExec("SELECT Member.Numero " + _ "FROM Member " + _ "WHERE Member.Numero=" + loDataProvider.ParameterAddSQL("Numero") + " AND " + _ "Member.Session3=" + loDataProvider.ParameterAddSQL("Session3")) Then Return False End IfThis one uses a data class I have. But, basically, if you code it entirely, you will follow the same route such as:
Public oDataSet As DataSet Public oDataTable As DataTable Public oDataView As DataView Public oParameters As New ArrayList Private oDataParameter As IDbDataParameter = Nothing Private oCommand As IDbCommand = Nothing Private oCommandText As New Collection Private oDataAdapter As IDbDataAdapter = Nothing Private oDataParameter As IDbDataParameter = Nothing Private oDataReader As IDataReader = Nothing Private oParameters2 As New Collection oDataParameter = New OleDbParameter("@Numero", oProcess.nNoMember) oParameters2.Add(oDataParameter) oDataParameter = New OleDbParameter("@Session3", oProcess.cSession2) oParameters2.Add(oDataParameter) oCommand.CommandText = tcSQL ' Only add the parameters if we have some If oParameters2.Count > 0 Then For Each oDataParameter In oParameters2 oCommand.Parameters.Add(oDataParameter) Next End If oDataAdapter.SelectCommand = oCommand oDataSet = New DataSet ' By default, .NET does not add the specific field length, which is needed in XML as at the other end ' someone would always get memo field instead of character field oDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey oDataAdapter.Fill(oDataSet) ' If we have a command text If oCommandText.Count > 0 Then ' Clear the command text collection oCommandText.Clear() End If ' Adjust to our default name oDataSet.Tables("Table").TableName = "Temp" ' Record count nCount = oDataSet.Tables("Temp").Rows.Count ' If we have at least one record If nCount > 0 Then oDataView = New DataView oDataView = oDataSet.Tables("Temp").DefaultView End If oCommand.Dispose()Note that code is just to show you an example. It is not a workable code. So, you may have to adjust. But, this should give you a good idea.