Sunteți pe pagina 1din 9

Comenzi Visual FoxPro

1. Comanda APPEND Comanda APPEND adauga inregistrari in modul ecran la sfarsitul bazei de date active. Sintaxa acestei comenzi este urmatoarea: APPEND [BLANK] Comanda APPEND urmata de cuvantul cheie BLANK este utilizata in program pentru adaugarea unei inregistrari vide, fara lansarea ecranului append. Daca nu exista un fisier format active se afiseaza o machete prestabilita care permite introducerea datelor.

2. Comanda BROWSE Comanda BROWSE afiseaza inregistrarile intr-o forma tabelara si permite editarea campurilor.Tabelul este incadrat intr-o fereastra . Sintaxa comenzii BROWSE este urmatoarea: BROWSE [FIELDS FieldList] [FONT cFontName [, nFontSize [, nFontCharSet]]] [STYLE cFontStyle] [FOR lExpression1 [REST]] [FORMAT] [FREEZE FieldName] [KEY eExpression1 [, eExpression2]] [LAST | NOINIT] [LOCK nNumberOfFields] [LPARTITION] [NAME ObjectName] [NOAPPEND] [NOCAPTIONS] [NODELETE] [NOEDIT | NOMODIFY] [NOLGRID] [NORGRID] [NOLINK] [NOMENU] [NOOPTIMIZE] [NOREFRESH] [NORMAL] [NOWAIT] [PARTITION nColumnNumber [LEDIT] [REDIT]] [PREFERENCE PreferenceName] [SAVE] [TIMEOUT nSeconds] [TITLE cTitleText] [VALID [:F] lExpression2 [ERROR cMessageText]] [WHEN lExpression3] [WIDTH nFieldWidth] [WINDOW WindowName1] [IN [WINDOW] WindowName2 | IN SCREEN] [COLOR SCHEME nSchemeNumber]. 3. Comanda CHANGE Comanda CHANGE constitue suportul complex pentru vizualizarea si editarea in modul full-screen a campurilor unei inregistrari din baza de date sau vederea activa. Sintaxa este: CHANGE [FIELDS FieldList] [Scope] [FOR lExpression1] [WHILE lExpression2] [FONT cFontName [, nFontSize [, nFontCharSet]]] [STYLE cFontStyle] [FREEZE FieldName] [KEY eExpression1 [, eExpression2]] [LAST | NOINIT] [LPARTITION] [NAME ObjectName] [NOAPPEND] [NOCAPTION] [NOCLEAR] [NODELETE]

[NOEDIT | NOMODIFY] [NOLINK] [NOMENU] [NOOPTIMIZE] [NORMAL] [NOWAIT] [PARTITION nColumnNumber [LEDIT] [REDIT]] [PREFERENCE PreferenceName] [REST] [SAVE] [TIMEOUT nSeconds] [TITLE cTitleText] [VALID [:F] lExpression3 [ERROR cMessageText]] [WHEN lExpression4] [WIDTH nFieldWidth] [WINDOW WindowName1] [IN [WINDOW] WindowNam2 | IN SCREEN | IN MACDESKTOP]] [COLOR SCHEME nSchemeNumber | COLOR ColorPairList] . 4. Comanda INSERT. Comanda INSERT adauga o singura inregistrare dupa cea curenta, daca nu exista un index principal active. Daca exista un astfel de index, INSERT introduce comanda APPEND iar inregistrarile sunt adaugate la sfarsitul fisierului. Sintaxa este urmatoarea: INSERT [BEFORE] [BLANK] 5. Comanda MODIFY STRUCTURE. Comanda MODIFY STRUCTURE modifica structura unei baze de date. Comanda scrie direct in fereastra de comenzi. 6. Comanda CLEAR ALL. Sterge toate variabilele de memorie si vectorii, selecteaza aria de lucru primara si inchide bazele de date impreuna cu fisierele index, memo, format asociate. 7. Comanda DELETE. Marcheaza pentru stergere inregistrari din baza de date activa. Sintaxa este urmatoarea: DELETE [<scope>] [FOR <expL1>] [WHILE <expL2>] [NOOPTIMIZE] 8. Comanda DISPLAY STRUCTURE. Afiseaza structura bazei de date. Sintaxa este urmatoarea: DISPLAY STRUCTURE [IN <expN> | <expC>] [TO PRINTER [PROMPT] | TO FILE <file>] [NOCONSOLE]
2

9. Comanda EXPORT TO. Copiaza date dintr-o baza de date FoxPro in fisiere cu formate diferite. Sintaxe este urmatoarea: EXPORT TO <file> [FIELDS <field list> | FIELDS LIKE <skel> | FIELDS EXCEPT <skel>] [<scope>] [FOR <expL1>] [WHILE <expL2>] [NOOPTIMIZE] [[TYPE] DIF | MOD | SYLK | WK1 | WKS | WR1 | WRK | XLS]] 10. Comanda LIST Afiseaza continutul unei baze de date, sau al unor expresii. Sintaxa este urmatoarea: LIST [FIELDS <expr list>] [<scope>] [FOR <expL1>] [WHILE<expL1>] [OFF] [NOCONSOLE] [NOOPTIMIZE] [TO PRINTER [PROMPT] | TO FILE <file>] 11. Comanda PAYMENT Returneaza numarul de parametrii care au fost transmisi procedurii apelate cel mai recent. Sintaxa este urmatoarea: PAYMENT(<expN1>, <expN2>, <expN3>) 12. Comanda REPLACE Actualizeaza articolele unei baze de date. Sintaxa: REPLACE <field1> WITH <expr1> [ADDITIVE] [, <field2> WITH <expr2> [ADDITIVE]] ... [<scope>] [FOR <expL1>] [WHILE <expL2>] [NOOPTIMIZE]
3

13. Comanda REPLICATE. Scrie succesiv o expresie specificata prin <expC> repetata de un numar de ori dat. Sintaxa: REPLICATE(<expC>, <expN>) 14. Comanda REPORT. Produce un raport. Sintaxa: REPORT [FORM <file> | ?] [ENVIRONMENT] [<scope>] [FOR <expL1>] [WHILE <expL2>] [HEADING <expC>] [NOEJECT] [NOCONSOLE] [NOOPTIMIZE] [PDSETUP] [PLAIN] [PREVIEW] [TO PRINTER [PROMPT] | TO FILE <file>] [SUMMARY] 15. Comanda SCAN. Parcurge o baza de date si executa anumite comenzi in mod conditional. Sintaxa: SCAN [NOOPTIMIZE] [<scope>] [FOR <expL1>] [WHILE <expL2>] [<statements>] [LOOP] [EXIT] ENDSCAN

16. Comanda SELECT. Extrage date din una sau mai multe baze de date. Sintaxa: SELECT [ALL | DISTINCT] [<alias>.]<select_item> [AS <column_name>] [, [<alias>.]<select_item> [AS <column_name>] ...] FROM <table> [<local_alias>] [, <table> [<local_alias>] ...] [[INTO <destination>] | [TO FILE <file> [ADDITIVE] | TO PRINTER [PROMPT] | TO SCREEN]] [PREFERENCE <name>] [NOCONSOLE] [PLAIN] [NOWAIT] [WHERE <joincondition> [AND <joincondition> ...] [AND | OR <filtercondition> [AND | OR <filtercondition> ...]]] [GROUP BY <groupcolumn>[, <groupcolumn> ...]] [HAVING <filtercondition>] [UNION [ALL] <SELECT command>] [ORDER BY <order_item> [ASC | DESC] [, <order_item> [ASC | DESC] ...]] 17. Comanda TIME. Returneaza ora curenta a sistemului. Sintaxa: TIME([<expN>]) 18. Comanda USE. Deschide o baza de date in zona de lucru specificata. Sintaxa: USE [<file> | ?] [IN <expN1>] [AGAIN] [INDEX <index file list> | ? [ORDER [<expN2> | <idx index file> | [TAG] <tag name> [OF <cdx file>] [ASCENDING | DESCENDING]]]]
5

[ALIAS <alias>] [EXCLUSIVE] [SHARED] [NOUPDATE] 19. Comanda AVERAGE. Calculeaza media aritmetica a expresiilor numerice, sau a campurilor numerice dintr-o baza de date activa. Sintaxa: AVERAGE [<lista expr>] [<domeniu>] [FOR <expL1>] [WHILE <expL2>] [TO <lista var.mem.> | TO ARRAY <tablou>] [NOOPTIMIZE] 20. Comanda BUILD PROJECT. Creeaza o baza de date proiect (.PJX). Sintaxa: BUILD PROJECT <proiect fis.> FROM <program> | <menu> | <report> | <label> | <screen> | <library> [, <program> | <menu> | <report> | <label> | <screen>| <library>...] 21. Comanda COPY FILE. Copiaza fisierul sursa indicat prin <fis.1>, in fisierul destinatie <fis.2>. Sintaxa: COPY FILE <fis.1> TO <fis.2> 22. Comanda COPY TO. Copiaza date dintr-o baza de date activa intr-un fisier. Sintaxa: COPY TO <file> [FIELDS <field list> | FIELDS LIKE <skel> | FIELDS EXCEPT <skel>] [<scope>] [FOR <expL1>] [WHILE <expL2>] [[WITH] CDX] | [[WITH] PRODUCTION] [NOOPTIMIZE] [[TYPE] [FOXPLUS | DIF | MOD | SDF | SYLK| WK1 | WKS | WR1 | WRK | XLS |
6

DELIMITED [WITH <delimiter> WITH BLANK | WITH TAB]]] 23. Comanda COUNT. Numara articolele din baza de date curenta. Sintaxa: COUNT [<scope>] [FOR <expL1>] [WHILE <expL2>] [TO <memvar>] [NOOPTIMIZE] 24. Comanda DISPLAY. Afiseaza continutul unei baze de date, sau al unor expresii. Sintaxa: DISPLAY [[FIELDS] <field list>] [<scope>] [FOR <expL1>] [WHILE <expL2>] [OFF] [TO PRINTER [PROMPT] | TO FILE <file>] [NOCONSOLE] [NOOPTIMIZE] 25. Comanda DO. Executa un program sau un fisier procedura. Sintaxa: DO <file> [WITH <parm list>] [IN <file>] 26. Comanda EDIT. Schimba inregistrarile dintr-o baza de date. Sintaxa: EDIT [FIELDS <field list>] [<scope>] [FOR <expL1>] [WHILE <expL2>]
7

[FONT <expC1>[, <expN1>]] [STYLE <expC2>] [FREEZE <field>] [KEY <expr1>[, <expr2>]] [LAST] [LEDIT] [REDIT] [LPARTITION] [NOAPPEND] [NOCLEAR] [NODELETE] [NOEDIT | NOMODIFY] [NOLINK] [NOMENU] [NOOPTIMIZE] [NORMAL] [NOWAIT] [PARTITION <expN2>] [PREFERENCE <expC3>] [REST] [SAVE] [TIMEOUT <expN3>] [TITLE <expC4>] [VALID [:F] <expL3> [ERROR <expC5>]] [WHEN <expL4>] [WIDTH <expN4>] [[WINDOW <window name1>] [IN [WINDOW] <window name2> | IN SCREEN | IN MACDESKTOP]] [COLOR SCHEME <expN5> | COLOR <color pair list>] 27. Comanda FSIZE. Returneaza lungimea unui camp dintr-o baza de date. Sintaxa: FSIZE(<expC1> [, <expN> | <expC2>])

28. Comanda GATHER FROM. Muta continutul unor variabile de memorie sau elemente de vector in campurile articolului curent. Sintaxa: GATHER FROM <array> | MEMVAR [FIELDS <field list> | FIELDS LIKE <skel> | FIELDS EXCEPT <skel>] [MEMO] 29. Comanda GETFILE. Afiseaza dialogul de deschidere a fisierelor. Sintaxa: GETFILE([<expC1>] [, <expC2>] [, <expC3>] [, <expN>] [, <expC4>]) 30. Comanda IMPORT FROM. Importa date dintr-un fisier cu structura diferita pentru a creea o baza de date specifica FoxPro. Sintaxa: IMPORT FROM <file> [TYPE] FW2 | MOD | PDOX | RPD | WK1 | WK3 | WKS | WR1 | WRK | XLS 31. Comanda JOIN WITH. Leaga doua baze de date. Sintaxa: JOIN WITH <expN> | WITH <expC> TO <file> FOR <expL> [FIELDS <field list> | FIELDS LIKE <skel> | FIELDS EXCEPT <skel>] [NOOPTIMIZE] 32. Comanda KEY. Returneaza cheia de indexare a fisierului index activ. Sintaxa: KEY([<cdx file>,] <expN1>[, <expN2> | <expC>])