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
Why is global asax is used?
Does asp.net still recognize the global.asa file?
Is session stored in browser?
can s/w quality assurance engineer switch field to programming side i m very much interested in programming but not much good in it
How does asp net store session ids by default?
What is http request and response?
Explain About duration in caching technique
What are the differences between clr & cts?
What is a reflection?
How do you handle server controls?
What are the options in ASP.NET to maintain state?
What are the different types of sessions in asp.net? Name them?
What is difference between ispostback and autopostback in asp net?
How do I know asp.net mvc version? : Asp.Net MVC
Which library is used by the testers and developers to develop automated tests and create testing tools?