************************************************** *-- Class: BooksAndAuthors *-- Program: BooksAndAuthors.prg * * CursorAdapter to provide access to the Microsoft * SQL Server data for books and authors * DEFINE CLASS booksandauthors AS cursoradapter SelectCmd = [SELECT TI.Title_id, TI.Title, AU.au_Lname, ] + ; [AU.au_Fname, TI.PubDate, ] + ; [TI.Price AS Price FROM Titles TI ] + ; [JOIN TitleAuthor TA ON TI.Title_id = TA.Title_id ] + ; [JOIN Authors AU ON TA.au_id = AU.au_id ] + ; [ORDER BY 1,2,3] KeyFieldList = [title_id] UpdateNameList = "Title_id Titles.Title_id, Title Titles.Title" UpdatableFieldList = [Title] UpdateType = 1 UseTransactions = .F. Alias = "BooksAndAuthors" DataSourceType = "ADO" CursorSchema = "Title_id C(6), Title C(120), Lname C(40), FName C(40), Pubdate T, Price Y" UseCursorSchema = .T. Name = "BooksAndAuthors" WhereType = 1 FUNCTION Init WITH This local loConnDataSource loConnDataSource = createobject('ADODB.Connection') ***<DataSource> loConnDataSource.ConnectionString = [provider=sqloledb;] + ; [Data Source=NYCPSJWBOOTH\VINCENT;] + ; [Initial Catalog=pubs;] + ; [User Id=emeduser;] + ; [Password=emedpwd;] ***</DataSource> loConnDataSource.Open() .DataSource = createobject('ADODB.RecordSet') .DataSource.CursorLocation = 3 && adUseClient .DataSource.LockType = 3 && adLockOptimistic .DataSource.ActiveConnection = loConnDataSource *** End of Select connection code: DO NOT REMOVE ENDWITH ENDFUNC ENDDEFINENow when I call CursorFill() and then browse I can edit the title field but when I go to move off that field I get an error message that says;