Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Craig Ringer
Nacef LABIDI wrote: Yes I don't issue any sort statement, and I indeed want the data to be show as it is stored in the database. That's what you're getting. PostgreSQL has an MVCC design. How it works in general terms (simplified, but I lack the expertise to give a complete explanation even if

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Padam J Singh
Nacef, Simply add a SERIAL column to your table. When you add a new row, a new value will be stored in this column if you do not specify the column name in the insert query. In your select query, always order by this column. When doing an update , do not update this column. When re-ordering, u

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread hubert depesz lubaczewski
On Tue, Apr 22, 2008 at 12:31:54PM +0200, Nacef LABIDI wrote: > When I have tested this with SQLServer it works well, since the rows doesn't > change position on the DB. > I hope that you understand my issue and I will provide any explanations if > someting isn't clear enough. well. in postgresql

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Pavan Deolasee
On Tue, Apr 22, 2008 at 4:01 PM, Nacef LABIDI <[EMAIL PROTECTED]> wrote: > > I am writing an application where here is some resources to plan events on. > I want to provide the user with the ability to customize the order in which > resources are displayed on the screen. To hope that the databas

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Nacef LABIDI
You are right about the fact that the rows don't keep the order they where created with at the start. I have verfied this. I will explain more my case : I am writing an application where here is some resources to plan events on. I want to provide the user with the ability to customize the order i

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread hubert depesz lubaczewski
On Tue, Apr 22, 2008 at 12:10:41PM +0200, Nacef LABIDI wrote: > Yes I don't issue any sort statement, and I indeed want the data to be show > as it is stored in the database. But after updating a row (I don't update > the ID, just some fields), it keeps its same place on the DB but jumps to > the e

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Gurjeet Singh
On Tue, Apr 22, 2008 at 3:24 PM, Nacef LABIDI <[EMAIL PROTECTED]> wrote: > Hi all, > > I am using Postgres in a Delphi application through ODBC. I am having an > issue with updating records. > > When I create a dataset to get the records in a table then after I update > one of these records and th

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Thomas Kellerer
Nacef LABIDI, 22.04.2008 11:54: Hi all, I am using Postgres in a Delphi application through ODBC. I am having an issue with updating records. When I create a dataset to get the records in a table then after I update one of these records and then refresh the dataset, the record goes to the e

Re: [SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Nacef LABIDI
Yes I don't issue any sort statement, and I indeed want the data to be show as it is stored in the database. But after updating a row (I don't update the ID, just some fields), it keeps its same place on the DB but jumps to the end of the dataset and by the way to the end of the DBGrid. Nacef On

[SQL] After updating dataset the record goes to the end of the dataset

2008-04-22 Thread Nacef LABIDI
Hi all, I am using Postgres in a Delphi application through ODBC. I am having an issue with updating records. When I create a dataset to get the records in a table then after I update one of these records and then refresh the dataset, the record goes to the end of the dataset. This is disappointi