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 viewstate parameter?
What are the page life cycle events?
What is the difference between client-side and server-side validations in webpages?
What is preprocessor in .net? Where it use?
What is the use of ASP.NET routing?
How can you pass multiple complex types in Web API?
Where can I get the details on migration of existing projects using various technologies to asp.net?
Explain method to handle error using HttpError in Web API?
In which event are the controls fully loaded?
What are the events that happen when a client requests an asp.net page from iis server?
What is difference between view and partial view?
When cookie will expire?
How would you enable impersonation in the web.config file?
If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?
What are the elements of a website?