How to check the end of the record in Datareader?
Answer Posted / anitha
Dim cmdstr As String
Dim cmdsql As New SqlClient.SqlCommand
Dim consql As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
cmdstr = "select top 1 columnName from tbl_Sample order by
ColumnName desc "
cmdsql = New SqlCommand(cmdstr, consql)
If consql.State = ConnectionState.Closed Then
consql.Open()
Dim drsql As SqlDataReader
drsql = cmdsql.ExecuteReader()
Do While drsql.Read
any Control value= drsql.Item(0)
Loop
drsql.Close()
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is enableviewstatemac in asp net?
Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?
explain code with datachaching with example
i want the asp.net technical questions and answeres
What is the Intermittent crashing of application in production?
How can we make sure that Web API returns JSON data only?
Define the steps to set up validation control.
In a Repeater control how one can provide an alternating color scheme ?
what is a .xap file? Explain with an example.
What are the advantages of passport authentication?
What types of data validation events are commonly seen in the client-side form validation?
They mostly asked difference between versions of technologies
What is the use of execute non query in asp.net?
Define common type system?
Does web services support data reader like pom project?