Discussion:
Indexing on table with buffer mode
(too old to reply)
Doug Allan
2005-03-28 15:41:30 UTC
Permalink
I'm trying to index a table on a field from within the program on a table
that has table buffering. When I do this it gives me an error saying that I
can't index on a file that has table buffering. Can somebody give me
alternate way of indexing on a table that is in buffer mode?

Thanks.

Doug
Stefan Wuebbe
2005-03-28 21:12:25 UTC
Permalink
Post by Doug Allan
I'm trying to index a table on a field from within the program on a table
that has table buffering. When I do this it gives me an error saying that I
can't index on a file that has table buffering. Can somebody give me
alternate way of indexing on a table that is in buffer mode?
I don't think there is a way. (why do you want to do so?)
If its a table, a typical way would be creating the index tag at
designtime (for one, because at runtime Index On requires exclusive
access).
If its a view, you can create the index tags before setting buffermode
to 5 for example
Select 0
Use yourView NoData
Index On theField Tag yourTag
CursorSetProp("Buffering", 5)


hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Doug Allan
2005-03-29 18:31:42 UTC
Permalink
The reason I want to do this is because I have a combo box with the fields
of the table as the rowsource. When the user selects a field I want to set
up a temporary index and sort on that field, rather than having index tags
on every field in the table. This might be what I end up having to do
though. Thanks for your help.

Doug
Post by Stefan Wuebbe
Post by Doug Allan
I'm trying to index a table on a field from within the program on a table
that has table buffering. When I do this it gives me an error saying that I
can't index on a file that has table buffering. Can somebody give me
alternate way of indexing on a table that is in buffer mode?
I don't think there is a way. (why do you want to do so?)
If its a table, a typical way would be creating the index tag at
designtime (for one, because at runtime Index On requires exclusive
access).
If its a view, you can create the index tags before setting buffermode
to 5 for example
Select 0
Use yourView NoData
Index On theField Tag yourTag
CursorSetProp("Buffering", 5)
hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Stefan Wuebbe
2005-03-30 07:28:34 UTC
Permalink
Post by Doug Allan
The reason I want to do this is because I have a combo box with the fields
of the table as the rowsource. When the user selects a field I want to set
up a temporary index and sort on that field, rather than having index tags
on every field in the table. This might be what I end up having to do
though. Thanks for your help.
How about using a different combobox.RowSourceType?
For example, types 3 and 5 can both be populated by an SQL
statement and you can alter that statement dynamically at
runtime if you want.
With combo.ColumnCount=1 only the first field is visible.
The second field could be the .BoundColumn and subsequent
fields could be included to ... ORDER BY m.nYourChoice
at runtime accordingly.


hth
-Stefan
--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------
Loading...