DATABASE sdh

 

GLOBALS

DEFINE p_soft .

END GLOBALS

 

MAIN

OPEN FORM ..

DISPLAY FORM .

CALL hladaj()

MESSAGE "Koniec programu."

SLEEP 3

CLEAR SCREEN

END MAIN

 

FUNCTION hladaj()

 

DEFINE vyber,podm CHAR(300),

najdene SMALLINT,

odp CHAR(1)

MESSAGE "Vstup vyhladavacieho kriteria"

SLEEP 3

MESSAGE ""

 

CONSTRUCT BY NAME podm ON soft.*

LET vyber = "SELECT * FROM soft WHERE ", podm CLIPPED

PREPARE s_vyber FROM vyber

DECLARE kurzor CURSOR FOR s_vyber

LET najdene = 0

FOREACH .

LET najdene = 1

DISPLAY .

PROMPT "Dalsi zaznam (a/n)? " FOR odp

IF odp = "n" THEN

EXIT FOREACH

END IF

END FOREACH

 

IF najdene = 0 THEN

MESSAGE "Ziadny zaznam sa nenasiel."

ELSE

IF odp = "a" THEN

MESSAGE "Ziadne dalsie riadky."

END IF

END IF

SLEEP 3

END FUNCTION