Record numbers are all to !

hog

Well-known member
Joined
Mar 17, 2003
Messages
984
Location
UK
I have a database that hase 10 records in it. If I use code like this with intRecordnumber set to 10 I get an error "There is no row at position 10"

Code:
m_drContract = m_dsContract.Tables("tblContracts").Rows(intRecordNumber)

However if I use this code with intRecordNumber set to 9 it returns the actual row at position 9???

I understand the Row is using zero base so if I ask for record 9 I should get the last tenth reord, but I dont I get the ninth?

Any ideas??
 
Upon further checking this problem starts as soon as the record count goes into double figures?

So to clarify...

If Im adding record 9 the move to recordcount-1 gives me the ninth (last) record.

If Im adding record 10 the move to recordcount-1 gives me the ninth (last but one) record!

Please any help would be most welcome....
 
Sussed it :)

I also have an order line field which when ordered results in:

1
10
2
3
4
etc....

So this is where the problem was and is now sorted....
 
Back
Top