3 Replies - 2377 Views - Last Post: 22 March 2012 - 01:34 PM

#1 usamah_g  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-March 12

Difference between sequence of records in the database and DataSet

Posted 21 March 2012 - 11:44 AM

I have a problem in the sequence of records in the Dataset

Hi
I have a table with autonumber and when I add records it added in the database correctly but when I view the records in my program change order of records
The program works correctly for a period
Example

In the table
1
2
3
4

In the program
1
4
3
2

My database is access
and I use vb.net

Is This A Good Question/Topic? 0
  • +

Replies To: Difference between sequence of records in the database and DataSet

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: Difference between sequence of records in the database and DataSet

Posted 21 March 2012 - 12:26 PM

Can you show us the code you use to fetch those records?

Generally speaking, for SQL databases, you use an ORDER BY clause to tell your database in which order you want the records to be returned.
Was This Post Helpful? 0
  • +
  • -

#3 usamah_g  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-March 12

Re: Difference between sequence of records in the database and DataSet

Posted 21 March 2012 - 05:52 PM

Thank You

Its done when I use ORDER BY
Was This Post Helpful? 0
  • +
  • -

#4 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Difference between sequence of records in the database and DataSet

Posted 22 March 2012 - 01:34 PM

Show the code procedure.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1