Computing.Net > Forums > Programming > Row Number

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Row Number

Reply to Message Icon

Name: Himadri
Date: February 21, 2005 at 18:10:35 Pacific
OS: XP Prof.
CPU/Ram: 2.4/640
Comment:

I want to Coloum namely Record No. in my databse program VB6.
This number I want to retreive from the table I created for the Program.
The Number would be Row Number where the data has been stored. How do I do it programatically.

Himadri



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: February 24, 2005 at 05:04:00 Pacific
Reply:

huh wah?

you want to retrieve a field from your db called RecordNumber?

Dim CN as ADODB.Connection
Dim RS as ADODB.RecordSet

Set CN = new ADODB.Connection
CN.Open [PUT YOUR CONNECTION STRING HERE]

Set RS = new ADODB.RecordSet
RS.Open "SELECT RecordNumber FROM [PUT YOUR TABLE NAME HERE]", CN

While not RS.EOF
    ' do something with the value
    Debug.Print RS("RecordNumber")
    RS.MoveNext
loop

RS.Close

CN.Close

Set RS = nothing
Set CN = nothing

Hope this helps,
Chi

They mostly come at night...mostly


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Row Number

Visual Basic Get selected datagridview number www.computing.net/answers/programming/visual-basic-get-selected-datagridview-number/19103.html

in need of c++ help! www.computing.net/answers/programming/in-need-of-c-help/14873.html

SQL Statement www.computing.net/answers/programming/sql-statement/10779.html