oCustomersData = CreateObject("CustomersData") RETURN DEFINE CLASS CustomersData AS CursorAdapter PROCEDURE Init *-- Our Source Type now is "ADO" This.DataSourceType = "ADO" *-- Create the alias This.Alias = "CustData" *-- We´ll add a property to store an ADO Connection object. This.AddProperty('oConn', NewObject("ADODB.Connection")) *-- And another property to store an ADO RecordSet object. This.AddProperty('oRS', NewObject("ADODB.Recordset")) *-- We´ll set the Connection String for the Connection object, as we´re quite used to. This.oConn.ConnectionString = ; "Provider=VFPOLEDB.1;Data Source=" +; "d:\projects\visual foxpro\bm\data\;" +; "Mode=ReadWrite|Share Deny None;" *-- ...and open the connection. This.oConn.Open() *-- Let´s set this newly created connection as the Active Connection *-- for our RecordSet object. This.oRS.ActiveConnection = This.oConn *-- ...and set the RecordSet as the data source for this Cursor Adapter. This.DataSource = "This.oRS" *-- This is our command to bring our data. This.SelectCmd = "select * from clients" *-- And fill up our Cursor with data, big boy! This.CursorFill() ENDPROC ENDDEFINE