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
How do session tokens work?
explain code with datachaching with example
What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
Explain exception filters?
What is hidden field in asp.net?
How do you handle server controls?
What are the session variables?
What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
Explain MVC model binders?
What are themes and skins in 2.0, explain usage scenario?
What is Cookies Less Session?
Mention the execution process for managed code?
Explain how is a property designated as read-only?
How can we create a website?
Is asp.net 64-bit enabled? How?