GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  Programming  >  VB.NET
Go To First  |  Previous Question  |  Next Question 
 VB.NET  |  Question 301 of 317    Print  
Move to the last row of a table
How to move to the last row of a table in VB.Net


  
Total Answers and Comments: 1 Last Update: May 03, 2008     Asked by: kuntal sarkar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 03, 2008 19:48:34   #1  
Behamcraq Member Since: May 2008   Contribution: 1    

RE: Move to the last row of a table
If any one want to get the last row it simple:

Try

Dim cmd As New SqlCommand

cmd.CommandText = "SELECT Max(Tour_ID) FROM Tours"

cmd.CommandType = CommandType.Text

cmd.Connection = sconnect

sconnect.Open()

Label20.Text = cmd.ExecuteScalar()

Catch ex As SqlClient.SqlException

Finally

sconnect.Close()

End Try

in this example we have selected the last row and actually we have output it into the form by using label20.text

I hope it will be help full for you


 
Is this answer useful? Yes | No

 Related Questions

How to assign and retrive values from array, arraylist dynamically........please see the questionWill enter the number of values to be inserted into array in one text boxex: n= txt_num.textand from another textbox I want to insert the 'n' values(ie varchar values)and then i want to retrive the values back such that i can use these values in select stmt of T-sql to retrive the data....and i want to display the data of all 'n' values in one table*here is the code.. for assigning
Read Answers (1) | Asked by : vraju123

How to move to the last row of a table in VB.Net 
Latest Answer : If any one want to get the last row it simple:TryDim cmd As New SqlCommand cmd.CommandText = "SELECT Max(Tour_ID) FROM Tours"cmd.CommandType = CommandType.Textcmd.Connection = sconnectsconnect.Open()Label20.Text = cmd.ExecuteScalar()Catch ex ...

How many types of "instead of triggers" can be specified on a table? What are they? 


 Sponsored Links

 
Related Articles

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php" document ready function var highlighted
 

jQuery Expanding and Collapsing Table Rows

jQuery Expanding and Collapsing Table Rows The expanding and collapsing behavior added earlier also conflicts with our filters If a section is collapsed and a new filter is chosen then the matching items are displayed even if in the collapsed section Conversely if the table is filtered and a section
 

jQuery Table Row Filtering

jQuery Table Row Filtering Earlier we examined sorting and paging as techniques for helping users focus on relevant portions of a table s data We saw that both could be implemented either with server side technology or with JavaScript Filtering completes this arsenal of data arrangement strategies B
 

jQuery Collapsing and Expanding Table Rows

jQuery Collapsing and Expanding Table Rows When large sets of data are grouped in tables as each year s set of articles are in our News page collapsing or hiding a section s contents can be a convenient way to get a broad view of all of the table s data without having to scroll so much mosgoogle To
 

jQuery Table Manipulation

Learning jQuery Table Manipulation By Karl Swedberg Jonathan Chaffer Better Interaction Design and Web Development with Simple JavaScript Techniques Learning jQuery packtpub com jQuery book Table Manipulation Let em wear gaudy colors Or avoid display Devo Wiggly World" In the first si
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

SQL Table Commands

SQL Table Commands Overview As mentioned previously in this series of SQL articles, databases are primarily composed of tables. The “columns and rows” structure of the table allows data to be efficiently inserted, manipulated, updated, and deleted from the database. The three mos
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape