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:
01041523
Views:
20
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?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform