Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Class
Message
 
To
25/11/2002 18:12:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00726719
Message ID:
00726736
Views:
20
Hilmar,

I read the article and pull out this exmple. I modified for
a DBC I have, and when I run it, nothing happens:
oCustomersData = CreateObject("CustomersData")

Define CLASS CustomersData as CursorAdapter

Procedure Init

	*-- Our Source Type now is "ADO"
	This.DataSourceType = "ADO"

	*-- 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\Bm.DBC"

	*-- ...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
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform