| Author |
The result set behaviour
|
Amit Tiwary
Greenhorn
Joined: Feb 13, 2003
Posts: 22
|
|
The result set I am using to fetch data from a table in MS-Access following the query "select * from fun",is fetching the recors but not sequentially from data base? How do I fix that? Thanx in adv Amit
|
 |
Kirtikumar Puthran
Ranch Hand
Joined: Mar 04, 2003
Posts: 37
|
|
select * from fun",is fetching the recors but not sequentially from data base? How do I fix that?
What do you mean by sequential. If you have a primary key defined in the table 'fun', then the above query will return results in order of that primary key column as that column will be indexed. Hope this helps. Rgds, Kirtikumar Puthran
|
Regards,<br />Kirti
|
 |
Avi Abrami
Ranch Hand
Joined: Oct 11, 2000
Posts: 1112
|
|
Hi Amit, As Kirtikumar says, "what do you mean by sequentially?" If you mean that you want the result set of your query to be sorted, then as far as I know, no database (including MS Access) returns a sorted result set from a database query -- unless the query includes an ORDER BY clause. In other words, in order to get a sorted result set back for your database query, it should be something like: Although I haven't verified Kirtikumar's claim (and I would like to know if he has), I don't think he is correct. Hope this helps you. Good Luck, Avi.
|
 |
Kirtikumar Puthran
Ranch Hand
Joined: Mar 04, 2003
Posts: 37
|
|
Hi Avi, In MS Access, when you open a database in Design View, there is a parameter known as "Indexed" for each column. The values of this parameter are: No(Default) Yes(Duplicates OK) Yes(No Duplicates) If the above query from Amit has to return results in a sorted order, then the Indexed parameter of the column has to be YES. Rgds, Kirtikumar Puthran
|
 |
 |
|
|
subject: The result set behaviour
|
|
|