Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: After updat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 12 Topic 3425 of 3799
Post > Topic >>

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

by nacef.l@[EMAIL PROTECTED] ("Nacef LABIDI") Apr 22, 2008 at 12:31 PM

------=_Part_2638_9542799.1208860314712
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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 in
which
resources are displayed on the screen. So there is a mapping between the
rows positions in the dataset and they display positions. After updating
one
of these resources the row jumps to the end of the dataset so does the
resource on the display. And the order gets scrambled. I cannot set this
order in the databe since it is customizable for each user.

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.

Thanks to all
Nacef

On Tue, Apr 22, 2008 at 12:15 PM, hubert depesz lubaczewski <
depesz@[EMAIL PROTECTED]
> wrote:

> 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 end of the dataset and by the way to the end of the DBGrid.
>
> why do you think it stays in the same place in db?
>
> besides - without "order by" you cannot depend on the order of rows.
> basically i treat them as in "random" order (which is not true, but
> helps me remember to never count on the "default" ordering.
>
> depesz
>
> --
> quicksil1er: "postgres is excellent, but like any DB it requires a
> highly paid DBA.  here's my CV!" :)
> http://www.depesz.com/
- blog dla ciebie (i moje CV)
>

------=_Part_2638_9542799.1208860314712
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

You are right about the fact that the rows don&#39;t keep the order they
where created with at the start. I have verfied this.<br><br>I will
explain more my case :<br><br>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. So there is a mapping between the rows positions in the dataset
and they display positions. After updating one of these resources the row
jumps to the end of the dataset so does the resource on the display. And
the order gets scrambled. I cannot set this order in the databe since it
is customizable for each user.<br>
<br>When I have tested this with SQLServer it works well, since the rows
doesn&#39;t change position on the DB.<br><br>I hope that you understand
my issue and I will provide any explanations if someting isn&#39;t clear
enough.<br>
<br>Thanks to all<br>Nacef<br><br><div class="gmail_quote">On Tue, Apr 22,
2008 at 12:15 PM, hubert depesz lubaczewski &lt;<a
href="mailto:depesz@[EMAIL PROTECTED]
">depesz@[EMAIL PROTECTED]
>&gt;
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, Apr 22, 2008 at 12:10:41PM +0200, Nacef LABIDI
wrote:<br>
&gt; Yes I don&#39;t issue any sort statement, and I indeed want the data
to be show<br>
&gt; as it is stored in the database. But after updating a row (I
don&#39;t update<br>
&gt; the ID, just some fields), it keeps its same place on the DB but
jumps to<br>
&gt; the end of the dataset and by the way to the end of the DBGrid.<br>
<br>
</div>why do you think it stays in the same place in db?<br>
<br>
besides - without &quot;order by&quot; you cannot depend on the order of
rows.<br>
basically i treat them as in &quot;random&quot; order (which is not true,
but<br>
helps me remember to never count on the &quot;default&quot; ordering.<br>
<br>
depesz<br>
<font color="#888888"><br>
--<br>
quicksil1er: &quot;postgres is excellent, but like any DB it requires
a<br>
highly paid DBA. &nbsp;here&#39;s my CV!&quot; :)<br>
<a href="http://www.depesz.com/"
target="_blank">http://www.depesz.com/</a>
- blog dla ciebie (i moje
CV)<br>
</font></blockquote></div><br>

------=_Part_2638_9542799.1208860314712--
 




 12 Posts in Topic:
After updating dataset the record goes to the end of the dataset
nacef.l@[EMAIL PROTECTED]  2008-04-22 11:54:26 
Re: After updating dataset the record goes to the end of the dat
nacef.l@[EMAIL PROTECTED]  2008-04-22 12:10:41 
Re: After updating dataset the record goes to the end of the dat
depesz@[EMAIL PROTECTED]   2008-04-22 12:15:23 
Re: After updating dataset the record goes to the end of the
craig@[EMAIL PROTECTED]   2008-04-22 20:46:30 
Re: After updating dataset the record goes to the end of the dat
spam_eater@[EMAIL PROTECT  2008-04-22 12:11:42 
Re: After updating dataset the record goes to the end of the dat
singh.gurjeet@[EMAIL PROT  2008-04-22 15:42:37 
Re: After updating dataset the record goes to the end of the dat
nacef.l@[EMAIL PROTECTED]  2008-04-22 12:31:54 
Re: After updating dataset the record goes to the end of the dat
depesz@[EMAIL PROTECTED]   2008-04-22 13:02:14 
Re: After updating dataset the record goes to the end of the
padam.singh@[EMAIL PROTEC  2008-04-22 16:32:57 
Re: After updating dataset the record goes to the end of the dat
pavan.deolasee@[EMAIL PRO  2008-04-22 16:15:10 
Re: After updating dataset the record goes to the end of thedata
nacef.l@[EMAIL PROTECTED]  2008-04-22 15:00:21 
Re: After updating dataset the record goes to the end of thedata
scott.marlowe@[EMAIL PROT  2008-04-22 09:16:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 21:49:46 CST 2008.