Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual MaxFrame pick list - HELP
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00173613
Message ID:
00173796
Views:
22
Well....that sucks. Think it may be time ya emailed Drew Speedie - he's real fast at responing - dspeedie@compuserve.com

>>That's what it was! And no - you don't need exclusive use of that table to add the indexes.
>>
>>>>It may be the 'buffermode'....(???) or something like that...seems like I've run across something similar myself, but it was more than a year ago....
>>>>
>>>
>>>You've got to set the buffermode to row buffering first than index than back to table buffering but I believe we ran into a problem with this particular index. Let me test it and get back to you on that one. Don't you have to get exclusive use of a table before you can add any indexes?
>
>
>Ok, here's the code in the CreateIndexTags I've been using for views only:
>
>
>
>= DODEFAULT()
>#DEFINE kcEOL				CHR(13)
>#DEFINE knRowBuffering		3
>#DEFINE knTableBuffering	5
>#DEFINE knTagName			3
>#DEFINE knTotColumnCols		5
>
>LOCAL loSaveAlias, llBufModeSetSucceeded, lcIndexExpression, lcTagName
>LOCAL lnCurColumn, lcFieldName, lnTotColumns
>
>* Save alias and buffer mode
>loSaveAlias =  CREATEOBJECT("cuspushpopalias")
>
>SELECT ( This.Recordsource)
>	
>llBufModeSetSucceeded = CURSORSETPROP( "BUFFERING", knRowBuffering )
>ASSERT !llBufModeSucceded MESSAGE 'Assertion Error' + kcEOL + ;
>	'Set buffer mode failed to set row buffering.' + PROGRAM() + "!" + kcEOL
>
>* Set indexes
>lnTotColumns = ALEN( THIS.iaColumnInfo)/knTotColumnCols
>FOR lnCurColumn = 1 TO lnTotColumns
>
>	lcTagName = THIS.iaColumnInfo( lnCurColumn, knTagName )
>	
>	* Drill down to column information if there is a tag name.
>	IF TYPE("lcTagName") = 'C' AND NOT EMPTY( lcTagName )
>	
>		loColumn = EVALUATE( "THIS.Column" + ;
>			ALLTRIM( STR( lnCurColumn, 3 ) ) )
>		lcFieldName = loColumn.ControlSource
>		
>		INDEX ON &lcFieldName TAG &lcTagName
>		
>	ENDIF
>	
>ENDFOR
>
>* Add additional tags here.
>
>llBufModeSetSucceeded = CURSORSETPROP( "BUFFERING", knTableBuffering )
>ASSERT !llBufModeSucceded MESSAGE 'Assertion Error' + kcEOL + ;
>	'Set buffer mode failed to set table buffering.' + PROGRAM() + "!" + kcEOL
>
>RELEASE loSaveAlias
>
>
>
>When I get to this line "INDEX ON &lcFieldName TAG &lcTagName",
>I get the error [File must be opened exclusively.]
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform