Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views, indexes, transactions
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00210215
Message ID:
00211443
Views:
30
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform