FoxPro Gotcha

Here are ten things that we all know are wrong but which keep catching us out.

  1. Include your database in the project and wonder why you cannot create a new view.
  2. Put a SKIP inside a SCAN loop. SCAN performs an implicit SKIP so that you process every alternate record.
  3. Write an expression in the View or Query Designer and run the query. Fox won't remind you to press the 'Add' button.
  4. Use a COPY TO without having specified a path and lose your files. Fox will probably put them in C:\Program Files\Visual Studio\VFP.
  5. Declare the array as LOCAL laTemp[1] before executing a COPY TO ARRAY and just get a single field in the array. Unlike most other array commands, COPY TO ARRAY doesn't resize the array automatically. Use SELECT ... INTO ARRAY instead.
  6. Concatenate the FirstName and LastName fields and forget to trim the spaces so you get 'John_____Smith_____'
  7. Concatenate the trimmed FirstName and LastName fields and forget to put a space between them so you get 'JohnSmith'
  8. Use an SQL SELECT statement as the RowSource for a Combo or ListBox but forget an 'INTO CURSOR Dummy' clause. The SQL will display its output in a Browse window because that's the default destination.
  9. Type SELECT Customer IN 0 and start processing Customer records. You are (of course) not in the Customer work area.
  10. Use LIST TO FILE and forget the NOCONSOLE option. You'll get all the information streamed to the active form.

Access Tips

FoxPro Tips

General Tips

 

Related Items

Hints and Tips for Visual FoxPro and Access

Hints and Tips for users and developers in Microsoft Visual FoxPro and Access.

Read More

Tips for database developers in Visual FoxPro

Help and advice from Alvechurch Data for database developers in Visual FoxPro

Read More

Tips for database developers in MS Access

Tips from Alvechurch Data for database developers building applications in Microsoft Access

Read More

General Topics in Database Development

Tips from Alvechurch Data for Database Developers

Read More

FoxPro Tips

Top ten tips for Visual FoxPro

Read More