Re: After updating dataset the record goes to the end of the dataset

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: After updating dataset the record goes to the end of the dataset
Дата
Msg-id 65937bea0804220312s2e873084n4741fa8e1cc3e26b@mail.gmail.com
обсуждение исходный текст
Ответ на After updating dataset the record goes to the end of the dataset  ("Nacef LABIDI" <nacef.l@gmail.com>)
Список pgsql-sql
On Tue, Apr 22, 2008 at 3:24 PM, Nacef LABIDI <nacef.l@gmail.com> 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 then refresh the dataset, the record goes to the end of the dataset. This is disappointing when editing records on a DBGrid, where users find their updated records jump to the end of the grid. Even after restarting the application, the updated record keeps showing at the end of the grid. I have tried the same thing with SQL Server and it works normally, so I thought it was a postgres behvior.

Has anyone an idea about what could be the cause of such a behavior.

The data is not guaranteed to be ordered if you do not specify an ORDER BY clause in your query. Try adding a meaningful ORDER BY clause, that should solve the problem.

HTH,

Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

В списке pgsql-sql по дате отправления:

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: After updating dataset the record goes to the end of the dataset
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: After updating dataset the record goes to the end of the dataset