|
Home > Archive > FoxPro database connector > April 2005 > Indexing on table with buffer mode
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 |
Indexing on table with buffer mode
|
|
| Doug Allan 2005-04-07, 8:05 pm |
| 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-04-07, 8:05 pm |
|
"Doug Allan" <doug-allan@home.com> schrieb im Newsbeitrag
news:KAV1e.829548$6l.452417@pd7tw2no...
> 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-04-07, 8:05 pm |
| 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
"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:Oe4Nup9MFHA.568@TK2MSFTNGP09.phx.gbl...
>
> "Doug Allan" <doug-allan@home.com> schrieb im Newsbeitrag
> news:KAV1e.829548$6l.452417@pd7tw2no...
table[color=darkred]
that I[color=darkred]
>
> 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-04-07, 8:05 pm |
|
"Doug Allan" <doug-allan@home.com> schrieb im Newsbeitrag
news:iah2e.842448$8l.687565@pd7tw1no...
> 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
-----------------------------------------------------------
|
|
|
|
|