Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Knowing when a count is available
Message
 
 
To
05/03/2012 11:23:24
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01537286
Message ID:
01537291
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform