Visual FoxPro 5 for Dummies

( 1 )


Visual FoxPro 5 For Dummies takes you on a fun and informative tour through the world of creating your own database. This down-to-earth reference shows you how to index and search databases, filter and query data, and create reports and forms. Just follow the plain English explanations, and soon you'll be creating your own Visual FoxPro database applications.
Read More Show Less
... See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (8) from $2.11   
  • New (3) from $72.88   
  • Used (5) from $2.11   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2008

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

0764501232 New. Has the slightest of shelf wear (like you might see in a major bookstore chain). Looks like an interesting title! We provide domestic tracking upon request, ... provide personalized customer service and want you to have a great experience purchasing from us. 100% satisfaction guaranteed and thank you for your consideration. Read more Show Less

Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2015

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


Visual FoxPro 5 For Dummies takes you on a fun and informative tour through the world of creating your own database. This down-to-earth reference shows you how to index and search databases, filter and query data, and create reports and forms. Just follow the plain English explanations, and soon you'll be creating your own Visual FoxPro database applications.
Read More Show Less

Product Details

  • ISBN-13: 9780764501234
  • Publisher: Wiley, John & Sons, Incorporated
  • Publication date: 3/28/1997
  • Series: For Dummies Series
  • Edition number: 1
  • Pages: 364
  • Product dimensions: 7.33 (w) x 9.18 (h) x 0.94 (d)

Table of Contents


About Visual FoxPro 5
What's New about Visual FoxPro
About This Book
How to Use This Book
What You're Not to Read
Foolish Assumptions
How This Book Is Organized
Part I: Databases and Tables
Part II: Ways Programmers Manipulate Data
Part III: Working with Forms
Part IV: Reports, Labels, and Graphs
Part V: Things That Make a Big Difference
Part VI: The Part of Tens
Icons Used in This Book
Where to Go from Here

Part I: Databases and Tables

Chapter 1: Creating a Database
Installing Visual FoxPro
Starting Visual FoxPro
Understanding Basic Database Terminology
Creating the Database

Chapter 2: Adding Content to Your Database
Choosing Your Data
Refining your data list
Planning Your Field Size
Breaking Up the Data into Tables
Building a Table
Setting special table properties
The record validation area
Adding Fields to a Table
Setting Special Field Properties
Setting the Display properties
Setting the field validation properties
The 13 field types
Chapter 3: Indexing Your Database
Using an Index
Planning an Index
Creating an Index on One Field
Creating Multiple Field Indexes
Inserting Expressions and Filters
Turning an Index On and Off
Modifying an Index
Deleting an Index

Chapter 4: Working with Data
Accessing Data Without Using a Form
Inserting Records into a Table
Paying Attention to Indexes When Adding Data
Displaying the Data: The Browsing Method
Editing the Data in Fields
Deleting Data
Deleting and undeleting records
Deleting records for good
Hiding (and unhiding) records that are marked to be deleted
Saving Data
Chapter 5: Rearranging the Data
Displaying a Selection of Fields
Moving Fields in a Table
Squeezing Fields onto the Screen
Sorting Records
Making the Sort Permanent
Sorting selected fields with the SORT command
Sorting selected records
Chapter 6: Changing the Structure of a Table
Modifying the Table Structure
Changing a field's definition
Changing a field name
Changing a field's data type
Changing a field width
Changing the number of decimal places
Changing the NULL attribute
Adding a New Field to a Table
Deleting a Table Field
Checking Indexes and Common Fields
Chapter 7: Tricks with Views
Creating a View
Displaying the View
Removing a View

Part II: Ways Programmers Manipulate Data

Chapter 8: Searching Databases
Using Edit-->Find (A Simple Search)
Using Table-->Go to Record
Top, Bottom, Next, and Previous
Record #
Searching by Using the Command Window
Using the Command Window
Setting the stage for the search
Chapter 9: Filtering Data
Understanding Filters
Creating a Filter
Removing a Data Filter
Filtering on More Than One Field
Filtering on a Partial Value of a Field
Using substrings in a filter expression
Using a substring in an expression
Filtering Data Across Multiple Tables
Chapter 10: The Fancy Way to Query Data
Creating a Query
Running the Query
Saving the Query
Running an Existing Query
Modifying an Existing Query
Specifying a Destination for Your Query

Part III: Working with Forms

Chapter 11: Creating Forms
Understanding Forms
Creating a Form
Using the Form Designer Toolbar
Understanding the Form Properties
Assigning an Icon to the Form
Using Controls
Displaying the Form Controls toolbar
Placing a control in the form
Repositioning a control in the form
Using the Layout Toolbar
Grid lines
Position marker
Layout window
Setting Tab Order
Running the Form
Chapter 12: Adding Controls to a Form
Label Control
Label text
Alignment of text
Label border
See-through label background
Label color
Label fonts
Text Box Control
Alignment, color, and font for a text box
Maximum number of characters
Assigning a field to a text box
Status bar help
Text Box Builder
Read-only data
Edit Box Control
Command Button Control
Pictures on the command button
Command Button Code Window
Default OK and Cancel
Command Group Control
Setting the number of buttons
Placing captions and graphics on buttons
Using the Layout tab of the Command Group Builder
Option Group Control
Check Box Control
Using a picture in place of a check mark
Adding check-box special effects
Combo Box Control
Using the List Items tab of the Combo Box Builder
Using the Style tab of the Combo Box Builder
Using the Layout tab of the Combo Box Builder
Using the Value tab of the Combo Box Builder
List Box Control
Grid Control
Line Control
Shape Control
Chapter 13: Making Controls Do Something
Displaying the Value of a Field
Assigning a Field Value to a Control
Moving to the Next Record
Moving to the Preceding Record
Moving to the Bottom of the Table
Appending a New Record to the Table
Deleting a Record

Part IV: Reports, Labels, and Graphs

Chapter 14: Creating Reports and Labels
Creating a Quick Report
Creating a Customized Report
Using the Report Designer
Creating a Report
Working with Objects in a Report
Aligning objects by using grid lines
Aligning objects by using position markers
Aligning objects by using the Layout toolbar
Moving an object in a report
Resizing an object in a report
Deleting an object from a report
Adding Color to a Report
Placing Shapes in a Report
Placing a line in a report
Placing a rectangle in a report
Placing a rounded rectangle in a report
Enhancing shapes in a report
Placing Pictures in a Report
Grouping Data in a Report
Changing the Font in a Report
Linking a Query to a Report
Using Print Preview
Printing a Report Quickly
Creating and Printing Mailing Labels
Grouping Labels
Linking a Query to a Label
Printing Labels
Performing a Mail Merge
Chapter 15: Making Data into a Graph
Changing Data into a Graph
Understanding Basic Graphing
Creating a Graph
Using the Graph Wizard to create specifications
Using a query to create specifications
Displaying a Graph

Part V: Things That Make a Big Difference

Chapter 16: Networking, Remote Computing, and the Internet
Connecting Computers
Understanding servers
Understanding conflicts among computers
Solving network performance problems
Accessing a Remote Database
Connecting to a remote database
Finding data in a remote database
Putting Your Data on the Internet
Adding a database to your Web page
Creating your search page
Placing your search page on the Web server
Chapter 17: Classes and ActiveX
Creating Classes
Understanding inheritance
Making your own class
Creating your own class
Using your own class
Tapping into ActiveX
Chapter 18: Creating a Macro
Deciding When a Macro Is Useful
Macros can't do everything
Recording a Macro
Testing Your Macro
Loading Your Macro into Memory
Automatically Loading Macros
Stopping Macros from Loading
Changing the Default Macro File
Deleting a Macro
Editing a Macro
Chapter 19: Identifying Parts of a Project
Analyzing a Noncomputerized System
The concept of input output
Identifying data input, data processing, and data output
Identifying data flow
Identifying Pieces of a Computerized System
Building the database
Building views
Building the indexes
Building forms
Building reports
Creating a Project
Making a new project

Part VI: The Part of Tens

Chapter 20: Ten Useful Things to Type in the Command Window
Chapter 21: Ten Top Operators
Equal (=)
Not Equal (<>)
Greater Than (>)
Less Than (<)
Greater Than or Equal To (>=)
Less Than or Equal To (<=)
Group ( )
Chapter 22: Ten Things That Sometimes Go Wrong
A Window Disappears When You Open Another Window
Tables Just Don't Relate
You Can't Find Data That You Know Is in the Database
The Search for Data Comes Up Empty
You Can't Recall Records That Were Deleted
You Got .AND. and .OR. Mixed Up
You Forgot a Field in a Table
You Can't Search a Remote Database
You Can't Run the Visual FoxPro Search Page for Your Web Site
Color in Reports Doesn't Match Color On-Screen
Chapter 23: Ten Places to Find Help
Online Help
Online Documentation
Visual FoxPro Manuals
Visual FoxPro Technical Support Lines
Community Colleges
Training Companies
Computer Stores
User Groups
The Internet
Chapter 24: Ten Best Keyboard Shortcuts
Esc (The Universal Go-Away Key)
Ctrl+Z (To Undo the Last Change)
Ctrl+C (To Copy)
Ctrl+V (To Paste)
Ctrl+X (To Cut)
Ctrl+Y (To Add a Record)
Ctrl+T (To Mark a Record for Deletion)
Ctrl+F4 (To Close the Current Window)
Ctrl+F2 (To Open the Command Window)
F1 (To Get Online Help)
Chapter 25: Ten Features to Explore Someday
Using the Spell Checker
Using Those Other Things in the Expression Builder
Importing and Exporting Your Stuff
Getting Organized By Using a Project File
Doing the Whole Programming Thing
Finding Data Phonetically
Using the SQL Language
Using the Debugger
Using the Setup Wizard
Using OLE
Appendix: Tips on Installing Visual FoxPro
Check Out the Facts Before Starting the Installation
Do you have the right equipment?
If you don't have the right equipment
Installing Visual FoxPro
The basic installation
Adding and removing components
What to do when Visual FoxPro doesn't work
Configuring Visual FoxPro
Setting up the Visual FoxPro environment
Customizing the Visual FoxPro toolbar


Reader Response Card

Read More Show Less

First Chapter

Chapter 16
Networking, Remote Computing, and the Internet

In This Chapter

  • Using Visual FoxPro on a local-area network
  • Retrieving information from a client/server database
  • Building a database for the Internet

You've probably heard about someone cracking the password that allowed her to gain access to government secrets -- from her home at the other end of the country. Makes you wonder whether anything is safe these days.

Computer security is breached on occasion in real life -- and all the time in the movies -- because computers are connected to other computers. The link between computers is called a network, and in this chapter, I explore ways that Visual FoxPro can be used on a computer network. (I don't show you how to break into the Pentagon's computers, however.)

I talk about three types of computer networks in this chapter:

  • Local-area networks (LAN)
  • Client/server
  • The Internet

Connecting Computers

Remember when your schoolteacher punched a hole in the bottom of two paper cups and tied them together with a string? A couple of kids pulled the string taut; then one of them spoke into one cup and the other listened in the other cup. A miracle had occurred: The teacher had made two cups and a string into a telephone.

Actually, the teacher created a small network that consists of two computers (cups) that are joined by a cable (string). Computer networks are more sophisticated than cups and a string, of course, but the same basic process occurs. One computer (cup) sends another computer (cup) information electronically over a cable (string) that can transmit the information over a distance. This setup is a simple computer network.

Each computer connected to the cable has an address, just like each house on a street has an address. Special network software acts like a traffic cop, making sure that each piece of information reaches the correct computer.

Understanding servers

At least one computer connected to the network is designated as the center of the network. That computer is called a server. Think of a server as being the computer that is used to store information shared by the other computers in the network. A server frequently is the computer that runs the network, although more than one server can be connected to the network, with only one of those servers actually running the network.

Computers that talk to the server over the network are called clients. You've probably seen the term client/server used in the press (and heard it used by the geeks in your office). The term is used to describe a computer network. Simply put, clients (computers like your PC) are connected to a server (such as a shared hard disk) through cables called a network. Sometimes, the server on a network is referred to as a file server.

You store your programs and your database on the hard disk inside your computer. You can store programs and a database on a floppy disk or a CD -ROM, of course, but most people use a hard disk.

Only your computer can get to the information stored on your hard disk. A friend can't access your data if your friend's computer and your computer aren't connected. You probably don't want a friend snooping around your hard disk, anyway.

You do want to share information, however, if you and the rest of your friends are working on the same project, such as building the FoxPro database that's going to make all of you millionaires. You can share information such as programs and a database by creating a local-area network (LAN), which is a bunch of computers connected by a cable.

At the center of the network is a file server that runs the LAN and stores all the files that you want to share on the file server's hard disk. A file server is little more than a shared hard disk. You can place your files on the file server, and someone else whose computer is connected to the network can use those files. You don't have to use sneaker net to exchange files. (You're using sneaker net when you load your file onto a floppy disk, put on your sneakers, and run the disk over to your friend so that she can use your file.)

Whenever you or your friends want to run a program or look at data in a database, you tell your computer to look for those files on the file server's hard disk. The hard disk usually is identified as the F drive (or another letter) when you log into the network. You then refer to the server's hard disk by that letter, just as you refer to your computer's hard disk as C.

Suppose that you create a database containing the names and addresses of all the businesses in your area. The database is stored on the file server's hard disk. Whenever you want to locate the address of a business, you tell Visual FoxPro to use the database located on the file server.

Some people consider a file server to be different from a client/server, although both a file server and client/server are computers connected to other computers in a network. The difference between a file server and client/server is a bit technical, but you'll have no problem understanding the concept.

When you query your database located on your hard disk, your computer goes to work, obeying Visual FoxPro's instructions to do the following:

  • Open the database.
  • Compare the search criteria with information in the database.
  • Display records that match the search criteria.

When you query a database located on a file server, your computer performs the same work, with one important exception: Records from the database travel from the file server along the cable to your computer; then your computer compares the records with the search criteria.

When you query a database located on a client/server, your computer sends the search criteria to the client/server and asks the client/server to find the matching record. The client/server then goes to work comparing records in the database. Your computer sits backs and waits for the client/server to send the matching record.

Understanding conflicts among computers

A computer network enables you and your friends to share resources. Although I've been talking about sharing only programs and data, a network also allows you to share printers and modems. Because this book talks about databases, I don't discuss those other shared resources.

You may have problems sharing practically everything. Remember the fights that ensued when you and a friend tried to grab the same toy? Similar problems -- minus the bruises -- occur when more than one computer tries to the use the same record from the database at the same time. The nerd term for this situation is contention. In some cases, no computer receives the record because of the conflict.

Contention occurs by chance, similar to lightning strikes. People get hit by lightning, but the conditions must be perfect for the strike to occur. The same is true of contention. You experience contention infrequently when you use a file server and even less often when you use a client/server. Client/server software has a better opportunity to prevent the perfect conditions from occurring because the client/server performs all the processing.

Although contention occurs infrequently, a common problem is for a person to lose changes made in a record shared on a file server because the changes are overwritten by another person.

Suppose that you want to change the department number of John Smith. You open the database and display the record in the table that contains John Smith's department number. You make the change in the record and close the table, and Visual FoxPro saves the changes to the database.

A problem arises, however, when someone else wants to change information in John Smith's record at the same time that you're changing the department number. Only one person can make changes in the same record at the same time.

Here's what happens behind the scenes:

  1. You request a copy of John Smith's record from the file server.

  2. The file server sends you the copy, which you change. You make changes in the copy of the record, not the record itself.

  3. Another person requests a copy of John Smith's record from the file server.

  4. The file server sends the other person a copy, which he changes. That person makes changes in the copy of the record, not the record itself.

  5. You save your changes to the file server, overwriting the current record. Now the permanent copy of John Smith's record reflects your changes.

  6. The other person saves his changes to the file server, overwriting the current record. Now the permanent copy of John Smith's record reflects his changes. The other person's changes overwrite your changes.

Resolving conflicts

Client/server software prevents common conflicts among computers because computers request information from the database and the client /server does all the searching and updating of records. The client/server knows to update and save the record before making other changes in the record.

File-server software does not prevent common conflicts among computers unless each computer takes necessary precautions when its user records changes.

Visual FoxPro automatically locks a table whenever a record in the table is being updated, such as when you:

  • Insert a new record into the table.
  • Save a record in the table.
  • Delete a record from the table.
  • Remove deleted records from the table.
  • Modify the field specifications of the table.

Don't feel that Visual FoxPro takes care of conflicts for you; it prevents conflicts from occurring only when it updates the table.

When you want to insert a new record into a table, save a record in the table, or delete a record from a table, you give Visual FoxPro a command. The program locks the table while the record is being updated; then it immediately unlocks the table. No one can use the table while the table is locked.

No lock is placed on the table while you're making changes in the record, however. You can make changes in the record while you are viewing a copy of the record. The actual changes occur only when you tell Visual FoxPro to close the table or save the table. Other computers still have access to the table while you're making the changes in the record.

Locking and unlocking a table

You can prevent conflicts from occurring by locking the table before you begin making changes. The other computers can access other tables of the database but not the table that you're using until you stop using the table.

You must remember to release the lock on the table, though; otherwise, other computer users will hunt you down like a fox.

Here's how you lock tables:

  1. Press Ctrl+F2 to display the Command Window.


  3. Press Enter to lock all the tables that you're going to use.

    Any time you open any table by choosing File-->Open, Visual FoxPro automatically locks the table.

  4. Open the table that you require and make changes in one or more records.

  5. Choose File-->Close to close the table.

    The Command Window remains open.

Here's how you unlock tables:

  1. Press Ctrl+F2 to display the Command Window.


  3. Press Enter to remove the lock from all the tables that you're going to use.

    Visual FoxPro automatically unlocks tables that are open or are opened after you press Enter.

You should follow two general rules to prevent conflicts whenever you use a database that is located on a file server:

  • If you're going to view data and not change data, type SET EXCLUSIVE OFF and press Enter in the Command window before you open the table. Visual FoxPro automatically locks tables when you open the table and prevents anyone except you from looking at the table. You don't need to lock out other users, however, if you are not changing data in the table.
  • Refresh the data that you see on-screen frequently by pressing F5. Although you aren't changing the data, someone else could be changing it without locking the table. Therefore, the data on-screen won't reflect changes made in the permanent record by the other person unless you refresh your screen. Refreshing tells Visual FoxPro to go back to the table and get you a fresh copy of the information.

You can lock individual records by using the RLOCK() command before you open the record; using the UNLOCK() command removes the locks. I don't go into detail on how to use RLOCK() and UNLOCK() because the SET EXCLUSIVE command is easier to understand and use.

Solving network performance problems

Sharing information in a network requires all the people who are using the network to have consideration for one another. The first consideration is to avoid hogging the database by locking tables and records unnecessarily.

Performance is another concern. All the computers in the network are using the same resource -- usually the file server. So while you're asking for a large file or a large number of records from the file server, it ignores other requests.

To reverse the situation a little, the time that you must wait for the file server to send you a file depends on how many requests are ahead of your request. If you wait too long, you'll complain to the system administrator (the person who is responsible for the network) about the network's lack of performance.

The problem occurs when someone makes an unreasonable request of the file server. Here are a couple of ways to avoid causing performance problems on the network:

  • Avoid using index files to sort data in tables.

    Suppose that you always want to see records in a table by a person's department name, last name, and first name. You can sort the records in the table or leave the records in data-entry order and use an index. Sorting the table increases the performance of the network.

    An index requires a two-step process. First, Visual FoxPro opens and reads the index; then it opens and reads the table. A sorted table, however, requires only one step: Visual FoxPro opens and reads the table.

  • Make changes in records during off-peak times, if possible.

    Everyone else must wait until you change and save the copy of the record. Performance improves for everyone if you make changes when few, if any, other users need to see information in the table.

I suggest that you don't worry too much about performance until you experience long wait times or hear that other users are having long wait times. If performance falls off, call your system administrator.

Accessing a Remote Database

A client/server is similar to a file server, except that the client/server does most of the work with the database.

Suppose that you need all the information about XYZ Co., and the information is stored in a database on a client/server. You use Visual FoxPro to place your request in the proper format and send the request to the client /server's database. Your computer waits for the client/server to extract and send you the information that you requested. The entire search is performed outside your computer.

The database on the client/server does not have to be a Visual FoxPro database. You can use Visual FoxPro to access practically any database supported by the Microsoft Open Database Connectivity driver (ODBC), such as a Paradox database or a SQL database.

Suppose that your company has a SQL database located on a client/server, and you want to query the database. You can do so by using Visual FoxPro if the database is supported by ODBC. (Your system administrator can tell you whether it is.)

Connecting to a remote database

You must connect your computer to a remote database before you can access data from it. Follow these steps:

  1. Create or open an existing database.

  2. Choose File-->New to display the New dialog box.

  3. Select the Connection radio button.

  4. Click the New file button to display the Connections dialog box.

    The Connections dialog box contains several options, but you need to deal with only four: Data Source, User ID, Password, and Database. (The Data Source list displays all the remote databases that you can use with Visual FoxPro.) I suggest that you consult your system admin istrator to determine the settings for the connection.

    • Data Source is the remote computer to which you want to connect.

    • User ID is the user ID that lets you log onto the remote computer.

    • Password is the password that is used to log onto the remote computer.

    • Database is the name of the database on the remote computer that contains the data you need.
  5. Click Verify Connections to link with the remote computer.

    The Select Database dialog box opens, allowing you to select the remote computer and database by using the same technique that you use to open a file from the Open dialog box.

Finding data in a remote database

After you make the connection to the remote database, you can search the database for information by using the Query Wizard. Follow these steps:

  1. Choose Tools-->Wizards-->Query.

    Visual FoxPro displays the Wizard Selection dialog box, shown in Figure 16-1.

  2. Choose Remote View Wizard to start the Remote View Wizard; click OK.

    Note that the wizard's description also appears in the dialog box.

  3. Click Connections to display the connection to the remote database.

    The remaining Remote View Wizard settings are obvious, so I don't go into too much detail here. You're asked to select the remote database and then choose the tables and fields to which you want to connect. You're then asked to choose the fields that you want to use to sort records as well as an expression to filter out unwanted records. You make your choices from lists displayed on-screen.

  4. Click Finish to send your request to the remote database.

    The information is returned to your computer from the remote database and displayed on your screen.

Putting Your Data on the Internet

By now, you've probably heard about the Internet revolution, and you may have explored the Internet yourself. I assume that you know how the Internet works and know how to create a Web page. If you're preparing to build your own page on the Net or to enhance your existing page with database capabilities, read on.

In this section, I show you how to give the world access to your Visual FoxPro database. The program can build the page, database, and database connection for you.

If you'd like more information about the Internet, check out The Internet For Dummies®, 4th Edition, by John R. Levine, Carol Baroudi, and Margaret Levine Young (IDG Books Worldwide, Inc.) for a complete discussion.

Adding a database to your Web page

You can allow visitors to your Web page to search information in your database if you link your Visual FoxPro database to your Web page. Suppose that you want to provide a directory of merchants in your community. Anyone who is looking for a good place to eat or purchase hardware supplies can use a computer to connect to your Web page. When the visitor connects, he enters in a text box the service that he wants to use and then clicks the Search button. The Web server searches your database and returns to the visitor information about appropriate merchants.

You can use Visual FoxPro to provide database lookup access to any visitor to your Web page. Before you become too excited, however, I have to tell you about the restrictions:

  • The Web server must be a Windows NT or Internet Information Server with HTTP (Hypertext Transfer Protocol) service, which is used to send your Web page to your visitors' computers. Check with your Web site service provider to see whether its Web server qualifies.
  • A licensed copy of Visual FoxPro 3.0b or later must be installed on the Web server. Don't try to install a copy of Visual FoxPro on the server yourself unless you have the approval of the Web server provider; the Web server may not be compatible with your version of Visual FoxPro.
  • Searches are limited to exact matches. You can't search for values that are greater than or less than the search criteria. Neither can you process a partial search, such as finding all last names that begin with the letters Sm.

Creating your search page

Typically, your database Web page is one of several pages that comprise your Web site. A Web site usually has an opening page from which visitors can jump to other pages in your Web site, one of which is the search page. The search page is the place where the visitor enters search criteria. Here's how you create a search page:

  1. Create the database and tables that you want to place on your Web site.

    Refer to Chapters 1 and 2 if you need to brush up on how to create databases and tables.

  2. Place data in the database.

    This data is the information that visitors to your Web site will search.

  3. Choose Tools-->Wizards to display the Wizards submenu.

  4. Choose All to display the Wizard Selection dialog box (refer to Figure 16-1).

  5. Select the Internet Search Wizard; click OK.

    The Internet Search Wizard steps you through each phase of building the database Web page.

  6. Enter a title and description for the page.

    The title can be something like "Where to Shop in My Town." The description can be something like "Welcome to my shopping guide. Enter the type of service that you need in the box; then click the Search button. Information about merchants is displayed on-screen."

  7. Choose a background image and a header image.

    An image is an electronic picture, such as the Visual FoxPro logo. You can purchase commercial pictures from your local computer store or through mail-order houses. The background image is the electronic picture that appears as the background of the page, and the header image is the electronic picture that appears between the title and the header.

    I find that trying different electronic pictures as the background image and the header image is the best way to decide which pictures are best for your page.

  8. Identify the fields that will be returned to the visitor and displayed on the visitor's screen.

    These fields make up what is called the return page. You also determine the electronic pictures to be used as the background image and header image on the return page.

    Visual FoxPro displays returned information in the form of a grid; columns are the fields that you selected, and rows are records of information. The wizard asks you to decide how many records you want to display in the return page. The default value is ten records, which probably is sufficient for most return pages.

  9. Click Finish.

    Visual FoxPro prompts you to enter the file name for the search page.

  10. Click OK.

    Visual FoxPro creates the search page for you.

Placing your search page on the Web server

The Internet Search Wizard creates three files, which you copy to your Web server. Your Web site provider can help you move the files into the proper directory on the Web server. The wizard generates the following files (replace <myfile> with the names that you gave the .HTM file):

  • <myfile>.HTM, which contains the search page
  • <myfile>.IDC, which contains the database connector file
  • <myfile>.HTX, which contains an extension of the .HTM file

Note: The .HTM file contains your search page; the other files are used to connect to your database.

When you copy these files to the Web server (which must have the proper copy of Visual FoxPro and compatible server software), you're almost ready for your first visitor.

The final step is to link the search page to your home page (or another appropriate page) of your Web site. The home page is the first page that the visitor sees when she enters your Web site.

Behind the scenes on your Web server

If you're like me, you want to know a little of what actually happens when someone uses your search page. I'll share what I have found:

  1. A visitor enters in his browser (replacing with the address of your Web site).

  2. The browser calls your Web site.
  3. The Web server sends your home page to the browser.
  4. The visitor jumps to your search page, enters search criteria, and then sends the search criteria to your Web server.
  5. The Web server runs Visual FoxPro, which creates a file called a common gateway interface (CGI).

    This file contains commands that handle communications between your search page and Visual FoxPro.

  6. The CGI file writes your visitor's request to a file and then tells Visual FoxPro to read the file.
  7. Visual FoxPro searches the database and creates a return page that contains the result of the search.
  8. Visual FoxPro tells the CGI file that the return page is ready to be shipped to the visitor.
  9. The CGI file sends the return page to the browser.
  10. The browser displays the return page and the result of the search on-screen.
Read More Show Less

Customer Reviews

Average Rating 1
( 1 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted February 29, 2000

    The worst dummies book yet

    I've purchased 'Dummies' books before to get a quick synopsis of a topic. But this one by far, is a terrible buy. I knew nothing about FoxPro before and regardless of what I learned from the book, the author did a terrible job. Most learning books have you build a project or something, but there was nothing like that here. You would think the author was going somewhere with a project, and then he'd just start a new paragraph with something else. Plus, many figured did NOT match the text. The author was also guilty of many 'but, we'll cover that later' or 'but we covered that in chapter X'. This was a poor, poor buy. IDG books are usually good, this wasn't.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)