Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Knowing when a count is available
Message
 
 
À
05/03/2012 11:23:24
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01537286
Message ID:
01537291
Vues:
17
>I guess the only way would be to set a property when I know I can fill the dataset:
>
>
>                        Using loSQLConnection As New SqlConnection(cConnectionString)
>                            oCommand.Connection = loSQLConnection
>                            nResult = oDataAdapter.SelectCommand.ExecuteNonQuery()
>
>                            ' If we can fill
>                            If lDataSet Then
>                                oDataAdapter.Fill(oDataSet)
>                            End If
>
>                        End Using
>
>
>Is there something simpler than that I can use to avoid setting up a property?

If you do 'ExecuteNonQuery' I think it automatically means that the query will not return a dataset. Only ExecuteReader returns a dataset.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform