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 datagrid asp.net?
I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place?
What is custom attribute?
What is ashx file in asp.net?
What are the advantages and limitations of query string?
What is special types forms
What is the use of dispose method?
Explain the difference between dataset and datareader.
Explain the namespace classes used in asp.net mvc? : asp.net mvc
What are sessions in asp net?
What are the three parts of an http response?
Explain server control extensibility with reference to asp.net 2.0 ?
How does a content page different from a master page?
What are the namespace classes used in asp.net mvc? : asp.net mvc
What is masterpage?