Presentation is loading. Please wait.

Presentation is loading. Please wait.

Working interactively with Microsoft Visual FoxPro Welcome to SDE Rainer Becker.

Similar presentations


Presentation on theme: "Working interactively with Microsoft Visual FoxPro Welcome to SDE Rainer Becker."— Presentation transcript:

1 Working interactively with Microsoft Visual FoxPro Welcome to SDE Rainer Becker

2 dFPUG –Online offers –Loose Leaf Magazine VFP-DevConVFP-Lokal/Develop Framework Visual Extend MVP, MCP, ISV Wizards & Builders GmbH

3 Topics DataExplorer –easy way to discover the datamodel and to run queries Command Window – the control center mainly used for browsing data Correct settings in Visual FoxPro 9.0 to avoid confusion within the team Working with the View Designer to create/save basic SQL statements

4 Data Explorer A visual tool to navigate in tables and to test SQL-statements

5 How to call Via Menu: –Tools -> TaskPane -> More Via Command Window: –DO home() + „dataexplorer.app“ –… with „-M“ Via Configuration File –config.fpw –command = do …

6 Add a Connection To a Database Container To a Tables directory To a Microsoft SQL-Server –(local) –over the Internet –available for VFP as a WebService

7 Add Directories instead Directories to Add: –adds all DBCs of given directory –does NOT add all tables of directory! problem with free tables –not shown in directory view… –you can add them one by one… –we should move all of them to DBCs…

8 Node Tables Shows Table Names Expands to Field Names –does not display comments –can display structure information –Options: Checkbox: Show Column Info –RightClick: Checkbox: Show Col Info „Design“ for Structure Modification

9 Run Query Define Query Run Query Save Query Copy Query to Clipboard Copy Results to Clipboard AddOn: Copy Results to Excel –if interesting code should be shown

10 Node Stored Procedures Unique Key Generation –GetNewKey() Other Key Generation –SetSRSKey() –SetPDefKey() –SetPListKey()

11 Node Views View Definition Browse Results Run Query (select * from view…) Design New Views should be stored in a separate DBC as they otherwise will get lost with next application update!

12 Command Window & Browse Window The non-visual interface for about everything but escpecially for browsing data

13 Basic Directory commands CD CD –MD, RD as well like DOS SET PATH TO [ADDI] –search path for file-based commands Results are shown in the Desktop If not visible, use Outshow-Keycode –Ctrl+Shift+Alt (do not mix with Del)

14 Basic Table commands USE USE –AGAIN SHARED or EXCLUSIVE –IN 0 (not yet used workarea) –ORDER –ORDER –ALIAS –ALIAS –NOUPDATE (for read-only access!) USE [IN ] (to close one) CLOSE TABLES (to close all)

15 Exclusive Table commands CREATE CREATE MODIfy STRUcture –non-exclusive if you just want to lock… ZAP (remove all records) PACK (remove deleted records) –never do this in Shark! First RECALL all records, delete/pack and then delefordel REINDEX (recreate index)

16 Basic Database Commands OPEN DATAbase ? | OPEN DATAbase ? | MODIfy DATAbase ? | MODIfy DATAbase ? | –to view all tables / contents –automatically opens database CLOSE DATAbase [ALL] SET DATAbase TO SET DATAbase TO –to switch current database / see toolbar VALIdate DATAbase [RECOVER]

17 Table contents viewing BROWse –NOCAptions (to show real field names) –FIELDS (to limit cols) –NOEDit (to prevent changes!) use ESCape key if you changed by accident! –NODElete (to prevent deletions!) –FOR –FOR

18 Extended BROWSE Resize/Rearrange with Mouse Doubleclick for AutoFit of Columns LEDIT/REDIT PARTITION for edit section in left/right part of grid IN MACDESKTOP (for separate window) Additional menu functions that sometimes might be helpfull

19 Saving Browse Settings SET RESOurce ON –Table FOXUSER created BROW PREFerence to load (or create if first time) a setting –Close with Ctrl+Q to not save changes or just use BROWse LAST to restore last configuration…

20 Contents Filtering FOR FOR –as long as based on current table! relational filtering needs an additional step like: –and seek(, „ “, „order“) and. = –and seek(, „ “, „order“) and. = very fast but for more complex filtering SQL has to be used!

21 Split up Browse command Use SET FIELDS TO beforehand to limit columns to be shown Use SET FILTER TO beforehand to limit records to be shown Use SET ORDER TO to set the order how the records are displayed Use SET DELETED ON/OFF to show deleted records or not

22 Other Stuff Call command window with Ctrl+F2 Show Desktop with Ctrl+Alt+Shift Clear Desktop with CLEAR Commands are logged and you can scroll back till last Cleanup command Mark multiple lines and select „Execute Selection“ in rightlick-menu End session with QUIT

23 Settings / Options Ease your life with the correct environment settings

24 Where to find Directly enter in command window –Syntax: SET TO /ON/OFF Write into configuration file –modi file home() + „config.fpw“ –Syntax: = /ON/OFF Use Tools -> Options dialog –for permanent saving in the registry –if you select „Save as Default“ only!

25 View Page Status Bar Clock Command Results System Messages Optional: Last Project Optional: MRU list to the max

26 General Page Cancel on Escape Log compilation errors Set Development on (compare time) Confirm file replacement Enter or tab to exit fields Strict Date Level

27 Data Page NEVER open exclusive on Server! show field names prompt for code page ignore deleted records rushmore optimization Collating Sequenze Machine NO automatic file locking! NO String comparison settings!

28 File Locations Page Default Directory Search Path –include all your data directories Optional: Start up program

29 Regional Page NEVER Use System Settings! Date Format Date Separator Century ON Decimal separator 1000 separator Week starts on / First week of Year

30 Editor Page Comment string should be the same You might use syntax coloring –I always do …

31 Recommendation Settings should be the same for all team members that exchange SQL- statements to prevent confusion! –can be extractet from registry as a.reg- file, double-click applies settings locally Never forget to Click „Save as Default“ before clicking „OK“ Shift+OK copies settings as commands to open debugout window if debugger is open


Download ppt "Working interactively with Microsoft Visual FoxPro Welcome to SDE Rainer Becker."

Similar presentations


Ads by Google