CREATE CURSOR List ( a c(1)) SELECT List APPEND BLANK APPEND BLANK 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 " " AS description,0.00 AS Price, "Ok" AS Buy FROM (THIS.cCursor)] cursorschema = "description M,prix Y,achat C(50)" ENDDEFINE
>CREATE CURSOR List ( a c(1)) > >SELECT List >APPEND BLANK >APPEND BLANK > >oCursor = CREATEOBJECT("Products") >oCursor.cCursor = "List" > >IF oCursor.CURSORFILL(.T.) > BROWSE >ELSE > aerror(laErrors) > messagebox(laErrors[2]) >ENDIF > >DEFINE CLASS Products AS cursoradapter > > cCursor = "" > > Alias = "PriceList" > SendUpdates = .F. > DataSourceType = "Native" > > SelectCmd = [SELECT "A"+SPACE(300) AS description,0.00 AS Price, "Ok" AS Buy FROM (THIS.cCursor)] > > cursorschema = "description M,prix Y,achat C(50)" > >ENDDEFINE >