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
In which event of the page viewstate is available?
Describe the Server Control Events of ASP.NET?
Define application state variable and session state variable?
What is data grid view in asp.net?
What are ASP.NET Web Forms? How is this technology different than what is available though ASP?
Which is faster union or union all?
What are the different types of cookies in asp.net?
Define web services in asp.net.
What is the exact purpose of http handlers?
Is asp.net a programming language or framework?
What is __ requestverificationtoken?
How do you sign out from forms authentication?
Explain the difference between Repeater and Data list control in ASP.NET?
How do we implement bundling in MVC?
Where is the view state data stored in asp net?