I'm trying to fill a datasete with a dataadapter.
When the query I made in the dataadapter have no results
Here's the code
Dim cnChequesRech As SqlConnection
Dim daChequesRech As SqlDataAdapter
cnChequesRech = New System.Data.SqlClient.SqlConnection("Password=;User ID=sa;Initial Catalog = ChequesRechazados;Data Source=srv3")
cnChequesRech.Open()
daChequesRech = New SqlDataAdapter("SELECT * from CETBAVRC where RAIZ = '" & Raiz & "'", cnChequesRech)
daChequesRech.Fill(dsRechazados, "ListadoRechazados") --> I get the error here!, as the query come with no results
cnChequesRech.Close()
How can I detect when the dataadapter has no results in order not to fill the datasete?
Thanks!....