|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Query - General - Return value not in order
Hello , I'm making a project using ASP.NET and Web Services using SQL and some VB.NET for the scipting.
I have a problem with the SQL. I have a simple WebService method called GetFlash which select all the table called FlashInfo and return it as a dataset, the table has AutoID so the return values should be from 1 to N. (by ID) Until now it was ok but suddenly it's start the values different, i have 31 rows and now it's return like this: 29,30,31,1,2,3,4,5,... (Again by the ID's) I don't have a clue why it's like this and I'm sure it's on the SQL. I have this problem on another table but there it's starting from 17. Thank you in advance. |
|
#2
|
||||
|
||||
|
when running a query and you want the data to be returned in a specific order, you must use an ORDER BY clause. a database query, in itself, will not come back in any specific order by itself without you requesting it.
__________________
Come JOIN the party!!! Quote of the Month: Pretension: The downside of being better than everyone else is that people tend to assume you're pretentious. Questions to Ponder: You can be overwhelmed and underwhelmed, but why can't you be simply whelmed? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#3
|
|||
|
|||
|
Thx!
Totally forgot from the ORDER BY... |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Query - General - Return value not in order |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|