CLOSE DATABASES all clear con=SQLCONNECT("LocalServer") && connect to any SQL Server IF con<0 ? "Failed to connect!!!!" ENDIF SQLEXEC(con,"SET ANSI_PADDING ON") SQLEXEC(con,"create table #test (f1 int, f2 varchar(10))") SQLEXEC(con,"insert into #test values(1,'aaaa')") LOCAL oCA as CursorAdapter oCA=CREATEOBJECT("MyCa") oCA.DataSourceType="ODBC" oCA.DataSource=con oCA.SelectCmd="SELECT * from #test" oCA.Tables="#test" oCA.KeyFieldList="f1" oCA.UpdatableFieldList="f2" oCA.UpdateNameList="f1 #test.f1, f2 #test.f2" oCA.ConversionFunc="f2 RTRIM" oCA.CursorFill() SELECT (oCA.Alias) GO top replace f2 WITH 'bbbb ' SKIP USE SQLEXEC(con,"select f2, f2+'X' from #test","res") SELECT res list DEFINE CLASS MyCA AS CursorAdapter FUNCTION BeforeUpdate(cFldState, lForce, nUpdateType, cUpdateInsertCmd, cDeleteCmd) ? cUpdateInsertCmd ENDFUNC ENDDEFINEBe aware that SQL Server may pad character fields with spaces, for more information read help topic about SET ANSI_PADDING ON.