Subject | Re: [IBO] Tying down the cursor with TIBO Dataset and D5 Pro |
---|---|
Author | Tony Masefield |
Post date | 2005-10-03T16:18:54Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
to link this query to a master query through the DataSource property
of the query (Where X = :X). Could this be the problem??
explanation of CommitAction but haven't found(?). Any references?
property in the query AfterPost event. Sorry, I see that the
description was 'messy'.
for logging data specific to equipment) on my laptop at work which
displayed the same problem. However in this case I had a
Query.Refresh in the Query.AfterPost and no Datasource link.
Removing the Refresh solved the problem (i.e. one can enter records
in sequence as I wish) but there is no Refresh in the app I'm
talking about.
The second application had a PK which was based on a TimeStamp and I
had used Refresh to update this field as well as a 'logged_by' field
(he who logs the data - it's a 24 by 7 shift operation). Both fields
were set as the default values for the fields in the table (i.e. Now
and User_Name respectively) hence leaving blank fields in the grid
was not a real option. I resorted to setting both fields
programmatically (by using NOW and TIBO_Database.UserName in the
query OnNewRecord Event) which resolved the problem - I know, I
would rather rely on the server to designate the current DateTime,
but couldn't figure a way around the refresh problem re-setting the
curser.
Doing some further 'investigations' on the app I'm developing at
home (the one I started discussing) I noticed that the cursor was
going to the top of the grid so I expanded the grid vertically to
see what would happen (thinking that it may be grid related). the
cursor after hitting the down key then went back around 10 records,
not to the top of the grid as I expected (there's about 20 or so
dummy records).
Sorry for the length of this post.
Thanks for the help HeLen.
Rgds,
Tony
> At 12:30 PM 3/10/2005 +0000, you wrote:The
> >Hi All,
> >
> >I have a simple DB grid attached to a TIBO Query/TIBO Database.
> >TIBO_DB is set to autocommit.down
> >The idea is simply that the 'operator' enters rows of data (it's a
> >data logging application), hitting the down arrow key to 'scroll'
> >to the next vacant row for the next round of input.the
> >However, when hitting the down arrow key after filling in a row,
> >cursor jumps back up the grid.Yes, am using autocommit. Also using an Order By clause plus a WHERE
> >Any ideas how to stop this happening?
>
> Are you using Autocommit? and/or an ORDER BY clause in your SQL?
>
to link this query to a master query through the DataSource property
of the query (Where X = :X). Could this be the problem??
> What's the CommitAction of the dataset?Think I've tried them all but to no avail. Have looked for an
>
explanation of CommitAction but haven't found(?). Any references?
> >I would have used bookmarks butone
> >I read somewhere they don't work (at least well? think it was in
> >of JW's 'white papers').(I
>
> Adding new records to the end of a set should behave like Append
> think!), unless you have something in your setup that's forcingthe dataset
> to reorder itself each time you move past EOF. You shouldn't needto resort
> to bookmarks in a repetitive data entry task.there
>
> >Perhaps I have a setting wrong (quite possible) but also maybe
> >is a trick to it with TIBO (also quite possible).morning)
>
>
> >Tried using QRY...Last late last night (actually very early
> >in AfterPost but encountered an error of an access violation (fromyou explain?
> >memory that was the error but it was late).
>
> I don't know what you mean by "tried using QRY in AfterPost". Can
>Actually it's QueryWhatever.Last - i.e. using the TIBOQuery Last
property in the query AfterPost event. Sorry, I see that the
description was 'messy'.
> HelenHave a similar app (i.e. an MDI application with child forms used
for logging data specific to equipment) on my laptop at work which
displayed the same problem. However in this case I had a
Query.Refresh in the Query.AfterPost and no Datasource link.
Removing the Refresh solved the problem (i.e. one can enter records
in sequence as I wish) but there is no Refresh in the app I'm
talking about.
The second application had a PK which was based on a TimeStamp and I
had used Refresh to update this field as well as a 'logged_by' field
(he who logs the data - it's a 24 by 7 shift operation). Both fields
were set as the default values for the fields in the table (i.e. Now
and User_Name respectively) hence leaving blank fields in the grid
was not a real option. I resorted to setting both fields
programmatically (by using NOW and TIBO_Database.UserName in the
query OnNewRecord Event) which resolved the problem - I know, I
would rather rely on the server to designate the current DateTime,
but couldn't figure a way around the refresh problem re-setting the
curser.
Doing some further 'investigations' on the app I'm developing at
home (the one I started discussing) I noticed that the cursor was
going to the top of the grid so I expanded the grid vertically to
see what would happen (thinking that it may be grid related). the
cursor after hitting the down key then went back around 10 records,
not to the top of the grid as I expected (there's about 20 or so
dummy records).
Sorry for the length of this post.
Thanks for the help HeLen.
Rgds,
Tony