SET MULTILOCKS ON CLOSE DATABASES ALL LOCAL oCursor as CursorAdapter LOCAL aErrors[1] cRetVal = "" SELECT 0 USE "d:\projects\vfp1\bm\version1\source\data\clients.dbf" SELECT 0 USE "d:\projects\vfp1\bm\version1\source\data\companies.dbf" oCursor = createobject("CursorAdapter") WITH oCursor .DataSourceType = "Native" .Alias = "ClientInfo" .AllowDelete = .T. .AllowInsert = .T. .AllowUpdate = .T. .CursorSchema = "RecId C(8), Comp_Name C(40), Cl_Name C(40), Active L" .KeyFieldList = "RecId" .SelectCmd = "SELECT Clients.*, Companies.* "+; "FROM Clients "+; "JOIN Companies ON Clients.CompanyId = Companies.RecordId "+; "WHERE Clients.RecordId = 'HG0M7JTZ'" .SendUpdates = .T. .Tables = "Clients, Companies" .UpdatableFieldList = "Comp_Name, Cl_Name" .UpdateNameList = "Comp_Name Companies.Company, Cl_Name Clients.Client_Name" IF .CursorFill(.T.) .CursorDetach() BROWSE .CursorAttach("ClientInfo") =TABLEUPDATE(1) ELSE AERROR(aErrors) MESSAGEBOX(aErrors[2],48,"Error Occured") ENDIF ENDWITH RETURNThe 2 tables:
Structure for table: CLIENTS.DBF Field Field Name Type Width Dec 1 RECORDID Character 8 2 COMPANYID Character 8 3 CLIENT_NAME Character 40 4 ACTIVE Logical 1 Structure for table: COMPANIES.DBF Number of data records: 3 Date of last update: 03/31/05 Code Page: 1252 Field Field Name Type Width Dec 1 RECORDID Character 8 2 COMPANY Character 40