DEFINE CLASS TestCA AS cursoradapter CursorSchema = "UpdateField1 C(9), UpdateField2 C(30)" Alias = "MyCA" DataSourceType = "ADO" Flags = 0 FetchSize = -1 Tables = "MySQLTable" BreakOnError = .T. Name = "TestCA" PROCEDURE Init local llReturn do case case not pemstatus(This, '__VFPSetup', 5) This.AddProperty('__VFPSetup', 0) case This.__VFPSetup = 2 This.__VFPSetup = 0 return endcase llReturn = dodefault() *** Select connection code: DO NOT REMOVE local loConnDataSource set multilocks on loConnDataSource = createobject('ADODB.Connection') ***<DataSource> **** Here you must put your own connection string loConnDataSource.ConnectionString = [Provider=SQLNCLI.1;Integrated Security=SSPI;]+ [Persist Security Info=False;] + ; [Initial Catalog=BORIS;Data Source=localhost;] ***</DataSource> loConnDataSource.Open() This.DataSource = createobject('ADODB.RecordSet') This.DataSource.CursorLocation = 3 && adUseClient This.DataSource.LockType = 3 && adLockOptimistic This.DataSource.ActiveConnection = loConnDataSource *** End of Select connection code: DO NOT REMOVE *** Setup code: DO NOT REMOVE ***<SelectCmd> text to This.SelectCmd noshow select * from MySQLTable endtext ***</SelectCmd> ***<KeyFieldList> text to This.KeyFieldList noshow KeyField1,KeyField2 && etc. endtext ***</KeyFieldList> ***<UpdateNameList> text to This.UpdateNameList noshow UpdateField1 MySQLTable.UpdateField1, UpdateField2 MySQLTable.UpdateField2 && etc. endtext ***</UpdateNameList> ***<UpdatableFieldList> text to This.UpdatableFieldList noshow UpdateField1, UpdateField1 && etc. endtext ***</UpdatableFieldList> *** End of Setup code: DO NOT REMOVE if This.__VFPSetup = 1 This.__VFPSetup = 2 endif return llReturn ENDPROC PROCEDURE AutoOpen *** Setup code: DO NOT REMOVE if not pemstatus(This, '__VFPSetup', 5) This.AddProperty('__VFPSetup', 1) This.Init() endif *** End of Setup code: DO NOT REMOVE ENDPROC ENDDEFINE