Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index & cursoradapter
Message
From
19/07/2003 01:43:39
 
 
To
18/07/2003 20:45:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00811669
Message ID:
00811740
Views:
13
Hi,

I found out my problem: I was indexing the cursor after a CursorRefresh(): I moved the code to the AfterCursorFill() event and it works great.

Here is a 'novice' question: why can't I index a cursor when table buffering is on?

Thanks for your help, it is really nice to have folks from Microsoft monitoring this site!

Thierry

>>Thanks for the input. I did create a structural index. My cursor is record buffered. I make a change in a record and I start a transaction to save it: this is when I get error 1548.
>>
>
>Hi Thierry,
>
>How about a small repro code similar to one I've posted?
>It will eliminate all confusions.
>
>Thanks,
>Aleksey.
>
>
>
>>>>Hi,
>>>>
>>>>I index the cursor generated by a cursoradapter. Apparently the index generated is non strutural and I get error 1548 when starting a transaction... Anyone seen this? Any solution?
>>>>
>>>>Thanks,
>>>>
>>>>Thierry Labarre
>>>
>>>
>>>Hi Thierry,
>>>
>>>Just create a structural index:
>>>
>>>
>>>clear
>>>
>>>CREATE TABLE testCA (f1 I)
>>>INSERT INTO TestCA values(1)
>>>INSERT INTO TestCA values(2)
>>>INSERT INTO TestCA values(3)
>>>
>>>oCA=CREATEOBJECT("CursorAdapter")
>>>oCA.DataSourceType="NATIVE"
>>>oCA.SelectCmd="select * from TestCA"
>>>?oCA.CursorFill()
>>>SELECT (oCA.Alias)
>>>INDEX ON f1 TAG f1
>>>*INDEX ON f1 TO testindex && <============= causes BEGIN TRANSACTION to fail
>>>
>>>LOCAL oEx as Exception
>>>
>>>TRY
>>>BEGIN TRANSACTION
>>>LIST
>>>END TRANSACTION
>>>CATCH TO oEX
>>>	? oEx.ErrorNo, oEx.Message
>>>ENDTRY
>>>
>>>
>>>Thanks,
>>>Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform