Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing a cursor adapter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01041470
Message ID:
01041523
Vues:
19
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform