DATABASE ..

MAIN

DEFINE p_soft .,

kod ,

odpoved ,

najdene .

 

OPEN FORM

DISPLAY FORM .

PROMPT "Zadaj kod dodavatela :" ..

MESSAGE "Hladanie software-u pre kod dodavatela :" ,kod

SLEEP 3

MESSAGE ""

 

# spojenie kurzoru s danym SELECT-om, meno kurzoru je jednozacne

 

DECLARE kurzor .

SELECT ..

 

LET najdene = FALSE

 

FOREACH kurzor INTO p_soft.*

LET najdene = TRUE

# DISPLAY BY NAME p_soft.*

 

# soft je v tomto pripade standardny obrazovkovy zaznam

DISPLAY p_soft.* TO soft.*

 

PROMPT " Chces nasledovny zaznam (a/n) ? "

FOR CHAR odpoved

IF odpoved = "n" THEN

EXIT FOREACH

END IF

END FOREACH

 

# DISPLAY sqlca.sqlcode, status

# SLEEP 3

# IF sqlca.sqlcode = NOTFOUND THEN

# IF status = NOTFOUND THEN

IF najdene = FALSE THEN

MESSAGE "."

ELSE

IF odpoved = "a" THEN

MESSAGE "."

ELSE

MESSAGE " ...."

END IF

END IF

SLEEP 3

CLEAR SCREEN

END MAIN