CREATE CURSOR List ( a m(1)) SELECT List APPEND BLANK REPLACE A WITH SPACE(300) APPEND BLANK REPLACE A WITH SPACE(300) oCursor = CREATEOBJECT("Products") oCursor.cCursor = "List" IF oCursor.CURSORFILL(.T.,.F.) && 1° param. to use CursorSchema, 2° to create an empty CA because I dont have the native table for test BROWSE ELSE aerror(laErrors) messagebox(laErrors[2]) ENDIF DEFINE CLASS Products AS cursoradapter cCursor = "" Alias = "PriceList" SendUpdates = .F. DataSourceType = "Native" SelectCmd = [SELECT a AS description,0.00 AS Price, "Ok" AS Buy FROM (THIS.cCursor)] cursorschema = "description M,prix Y,achat C(50)" ENDDEFINEBut that's not exactly what I want to do
CREATE CURSOR List ( a m(1),b C(1)) SELECT List APPEND BLANK REPLACE A WITH SPACE(300) APPEND BLANK REPLACE A WITH SPACE(300) oCursor = CREATEOBJECT("Products") oCursor.cCursor = "List" IF oCursor.CURSORFILL(.T.,.F.) && 1° param. to use CursorSchema, 2° to create an empty CA because I dont have the native table for test BROWSE ELSE aerror(laErrors) messagebox(laErrors[2]) ENDIF DEFINE CLASS Products AS cursoradapter cCursor = "" Alias = "PriceList" SendUpdates = .F. DataSourceType = "Native" SelectCmd = [SELECT a+b AS description,0.00 AS Price, "Ok" AS Buy FROM (THIS.cCursor)] cursorschema = "description M,prix Y,achat C(50)" ENDDEFINETks again