Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views, indexes, transactions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00210215
Message ID:
00211443
Vues:
23
>Have a form with a view on a page of a pageframe. The view is run when the user accesses the page. The view is indexed for display in a grid. There is another table, not remotely associated with this view that is a state process table. It is updated when a user quits or enters a form. When leaving a form, the state process table is updated in code written in the .Destroy event of the base form class.
>This update is in a transaction. If the user is on the page with the view, the begin transaction statement errors with "Non-structural indexes are open......" The view is indexed with INDEX ON expr TAG sometag. I thought that this created structural indexes. Need to get around this.
>
>Steve


In order to index a view you have to have buffering set to 3. Example:

** Open Tables and Set Buffering, Filters
USE uv_cad_onchskey ALIAS cad IN 0 NODATA
* Lets set up an index on the the view so added records will
* appear in the order we wish
lSuccess = CursorSetProp("Buffering", 3, "cad")
IF NOT lsuccess
messagebox('Buffering 3 of Contract Amendment History ADL Table not successful',MB_OK+MB_ICONEXCLAMATION)
RETURN .F.
ENDIF
* We are indexing on the doc number and rev and level so the user
* can view the records in a logical order
INDEX ON docnumber+dmarev+dmalevel TAG Master
* Final Buffering set
lSuccess = CURSORSETPROP("Buffering", 5, "cad")
IF NOT lsuccess
messagebox('Buffering 5 of Contract Amendment History ADL Table not successful',MB_OK+MB_ICONEXCLAMATION)
RETURN .F.
ENDIF

HTH
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform