* null is the insert default SET NULL ON SET NULLDISPLAY TO 'NULL' SQLDISCONNECT(0) CLOSE DATABASES ALL CLOSE TABLES ALL CLEAR ERASE custser.DBF CREATE TABLE custser FREE ; ( CUSTSERID I; , F1 C(7) NULL ; , F2 C(7) NOT NULL ; , F3 C(7) NULL ; , F4 C(7) NOT NULL ) * empty BROWSE LAST USE TEST() PROCEDURE test SET MULTILOCKS ON WITH CREATEOBJECT('cursoradapter') AS CursorAdapter .Alias = 'vCACS' .BREAKONERROR = .t. .AllowInsert=.T. .AllowUpdate=.T. .BufferModeOverride= 5 .KeyFieldList = 'CustSerID' .NoData = .T. .Prepared = .F. .Tables = 'CustSer' .UpdateType= 1 .UseCursorSchema = .T. .SendUpdates = .T. .WhereType = 3 .DataSourceType = 'ODBC' .CursorSchema = ; [CUSTSERID I ; , F1 C(7) DEFAULT 'Aleksey' ; , F2 C(7) DEFAULT 'Aleksey' ; , F3 C(7) DEFAULT 'Aleksey' ; , F4 C(7) DEFAULT 'Aleksey' ] .DATASOURCE= SQLSTRINGCONNECT([DSN=Visual FoxPro Tables;UID=;PWD=;] + ; [SourceDB=]+SET("DIRECTORY")+[;SourceType=DBF;Exclusive=No;] + ; [BackgroundFetch=Yes;Collate=Machine;]) .SelectCmd = [select custserid, F1, F2, F3, F4 from custser WHERE custserid = ?M.gnCustSerID] * F3 and F4 are skipped .UpdatableFieldList = [CUSTSERID, F1, F2] .UpdateNameList =[CUSTSERID custser.custserid ; , F1 custser.F1 ; , F2 custser.F2 ] IF .CursorFill(.T.,.T.) * insert custserid only INSERT INTO vcacs (custserid) VALUES (1) * 34444 ? GETFLDSTATE(-1) * expected a F4 error, but VFP fill it with a empty, without errors IF NOT TABLEUPDATE(1) ? "step 1: ",MESSAGE() =TABLEREVERT(.T.) ENDIF * TRY WITH SETFLDSTATE, expected same behaviour INSERT INTO vcacs (custserid) VALUES (2) SETFLDSTATE('F4',3) * 34443 ? GETFLDSTATE(-1) IF NOT TABLEUPDATE(1) ? "step 1: ",MESSAGE() =TABLEREVERT(.T.) ENDIF .CursorDetach ENDIF SQLDISCONNECT(.DATASOURCE) * local cursor is empty !! BROWSE LAST ENDWITH SQLDISCONNECT(0) CLOSE DATABASES ALL CLOSE TABLES ALL * It seems me that there am a great bug ( on VFP ODBC ? ) * the program fail 2 tableupdate() * and do 2 tablerevert, * result is a empty local cursor, * BUT THE SOURCETABLE is filled with 2 records * and F4 is EMPTY !!! * 1 Aleksey Aleksey NULL BLANK * 2 Aleksey Aleksey NULL BLANK USE custser BROWSE LAST * next fire the standard ( Bad design !) error F4 INSERT INTO custser (custserid) VALUES (3779862) BROWSE LASTFabio