Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing a cursor adapter
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01041470
Message ID:
01041606
Views:
23
Thanks for your reply Sergey, I've found the problem was with the Locktype property of the RS. It was set to allow table buffering (4), I just changed to 1 (readonly) and it solved it.



>I'm not sure why cursor is read-only for you. I put together a simple test code which indexes CA cursor w/o any problems. Try and see if it works for you.
>
>lcConStr = "Provider=vfpoledb;Data Source="+HOME(2) + "northwind\northwind.dbc"
>oCon = CreateObject("ADODB.connection")
>oRs  = CreateObject("ADODB.RecordSet")
>
>oCon.Open(lcConStr)
>oRs.ActiveConnection = oCon
>oRs.Open("SELECT * FROM Employees")
>
>oCa = CreateObject("CursorAdapter")
>oCa.DataSourceType=[ADO]
>oCA.Alias=[MyCursor]
>oCa.CursorFill(,,,oRS)
>
>SELECT MyCursor
>
>INDEX ON EmployeeID TAG EmployeeID
>INDEX ON LastName TAG LastName
>
>BROWSE LAST NOWAIT
>
>
>>Hi all, I'm parsing an ADO recordset to a VFP cursor using cursoradapter like this:
>>
>>
>>oCa = CreateObject("CursorAdapter")
>>oCa.DataSourceType=[ADO]
>>oCA.Alias=[MyCursor]
>>oCa.CursorFill(,,,myADORecordset)
>>
>>
>>But the resulting cursor is readonly and I cannot create an index. Is there any way to index it without having to pass the data to another cursor?
>>
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Reply
Map
View

Click here to load this message in the networking platform