Home > Archive > FoxPro database connector > November 2005 > Index Sequence









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Index Sequence
Andy Trezise

2005-11-15, 8:25 pm

I have a table that I open in buffer mode 4.

I switch from my form to another form (changing to the parent forms
DataSessionID - don't know if this is technicallly correct).

I then append a new record to my table....I don't use TABLEUPDATE at this
point....and return to the parent form.

The grid on that form shows the newly added record but it is not in the
correct index sequence. After a few seconds the grid seems to sort itself
out and the new record slots into it's correct position.

I assume that this is because of the table buffering but can't understand
why. I've tried a FLUSH but that has no effect (I suppose that's because
FLUSH only commits updated records ie. where you've done a tableupdate()).

Just wondered if anyone else had seen this behaviour and whether there was a
way around it.

I don't want to loose the functionality that buffering brings but it
sometimes seems more hassle than it's worth.


Olaf Doschke

2005-11-16, 7:25 am

Hi Andy,

> Just wondered if anyone else had seen this behaviour and whether there was a way around it.
>
> I don't want to loose the functionality that buffering brings but it sometimes seems more hassle than it's worth.


I'd say the grid has more to do with it, than the
buffering. If you refresh() the grid after adding the
new record, does it sort "immediately"?

Bye, Olaf.


Dennis Longfellow

2005-11-16, 11:24 am

Andy,

I see Olaf answered your refresh question.

>
> I switch from my form to another form (changing to the parent forms
> DataSessionID - don't know if this is technicallly correct).
>


Correct but not necessary. All you need to do is let the second form use
the default data session, which will be the first form's data session at the
time you switch to the second form.

Dennis Longfellow


Andy Trezise

2005-11-16, 1:24 pm

Yes I refresh the grid but it has no immediate effect....it's not until you
scroll up / down etc that the sequence is corrected

"Olaf Doschke" < T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14> wrote in message
news:urTbxRq6FHA.3048@TK2MSFTNGP10.phx.gbl...
> Hi Andy,
>
>
> I'd say the grid has more to do with it, than the
> buffering. If you refresh() the grid after adding the
> new record, does it sort "immediately"?
>
> Bye, Olaf.
>



Fred Taylor

2005-11-16, 8:25 pm

Try doing a GO RECNO() somewhere in your code, like where you're doing your
grid.Refresh() (just before it).

--
Fred
Microsoft Visual FoxPro MVP


"Andy Trezise" <andy@work.com> wrote in message
news:uYkHJut6FHA.1420@TK2MSFTNGP09.phx.gbl...
> Yes I refresh the grid but it has no immediate effect....it's not until
> you scroll up / down etc that the sequence is corrected
>
> "Olaf Doschke" < T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14> wrote in
> message news:urTbxRq6FHA.3048@TK2MSFTNGP10.phx.gbl...
>
>



Andy Trezise

2005-11-21, 11:24 am

That worked 1st time.....thanks very much.

"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:ecnS8Sx6FHA.4036@TK2MSFTNGP11.phx.gbl...
> Try doing a GO RECNO() somewhere in your code, like where you're doing
> your grid.Refresh() (just before it).
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Andy Trezise" <andy@work.com> wrote in message
> news:uYkHJut6FHA.1420@TK2MSFTNGP09.phx.gbl...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com