Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 13th, 2004, 08:32 PM
Authorized User
 
Join Date: Oct 2004
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to know the acual row in my table

hi guys ,

when i query my table in query analyzer , it shows the actual row in the left
        trno
1 2
2 3
3 4
4 5
5 6
6 7

for trno=2 the row is 1, how can i get the row

tnx in advanced:)
  #2 (permalink)  
Old October 13th, 2004, 11:20 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

In SQL Server there is no such thing as a row number. Oracle has. By Theory the Records in a table will not have a specific order other than that specified by the indices. SQL Server follows this principle. So you cannot get teh row number of any particular row. However there are ways of achieving this. You can write a sp which creates a temporary table (or a table variable) which contains an identity column (viz. RowNumber) and insert the records from your table to this table. So each of the rows in your new table will have a rownumber.

Regards
Ganesh
  #3 (permalink)  
Old October 14th, 2004, 12:34 AM
Authorized User
 
Join Date: Oct 2004
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

heres the actual scenario

i have textboxes whoch are bounded
ii have buttonnext and btnprevoius, it works right now
but if i want to search particular data it will fill the textbox, after this when i clik the next button, it will follow the next row, and so with the prevoius

Private Sub bntNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntNext.Click
        Try

            Me.BindingContext(myInvoice.InvoiceTable).Position += 1
            updatePosition()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
 what can u suggest me
tnx


  #4 (permalink)  
Old October 14th, 2004, 12:42 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I think you should be using a datarepeater for this purpose.

Regards
Ganesh
  #5 (permalink)  
Old October 14th, 2004, 12:43 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I mean Repeater with paging.

Regards
Ganesh
  #6 (permalink)  
Old October 17th, 2004, 08:20 PM
Authorized User
 
Join Date: Oct 2004
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Ganesh,
im using vb.net for windows application

  #7 (permalink)  
Old October 18th, 2004, 12:10 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Sorry, I am not quite familiar with windows development in .net

Regards
Ganesh
  #8 (permalink)  
Old October 18th, 2004, 12:31 AM
Authorized User
 
Join Date: Oct 2004
Location: , , Philippines.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok tnx niway



Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Count in each table ayazhoda Access VBA 0 April 15th, 2008 04:31 PM
UPDATING 1 row with another row in same table rit01 SQL Server 2000 3 February 19th, 2006 08:55 AM
first row of a table Adam H-W SQL Language 2 January 11th, 2005 10:15 AM
How to duplicate 1 row in table minhpx SQL Language 1 December 20th, 2004 09:51 AM
i need to lock a row in table alyeng2000 SQL Server 2000 6 May 17th, 2004 09:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.