Solved

Visual Fox Pro ???'s

Posted on 1998-10-13
1
218 Views
Last Modified: 2013-12-25
Each fall, hundredes of applications are recived from addmissions to ringling School of Art and Desing. These come via snail mail like they have for years, but increasingly students are choosing to apply over teh web. we have a nice on-line form which mimics the one in the catalog. However, we also haven't succeeded in making the information that comes in this form updatable into the databases that are currently used by the addmissions department. We need to find a way to create 'importable records' from the on-line form. What this requires is figuring out what form we can create a plain text document that will be importable into the visual fox pro that is currently used by the admissions department. make sense?
Question: Can import a plain text document with some fields named that will be read and correctly interpreted by visual fox pro??? If so, what if the specifacation of this syntax?
Thank you,
Chip Collier
0
Comment
Question by:crash020297
1 Comment
 
LVL 2

Accepted Solution

by:
Billy_Pilgrim earned 600 total points
ID: 1855703
Yes, you can.  Here is an example. A student enters some information, and you have a Foxpro table that looks like this with the name "Students":

Name            Country   GPA           PhoneNum
(character 30) (char 30) (numeric 5,3)  (character 20)

And the student enters the data, you save it to a text file called Student.TXT that looks like this:

"John Smith" "Germany" 3.123 "1234567890123"

In Foxpro:
USE Students
APPEND FROM Student.TXT TYPE DELIMITED WITH BLANK

That will put the data into the right fields for this student.

But, let's suppose that the "country" data piece is optional. ..

You need to leave a spacer for FoxPro so that it knows to skip that field, so your text file will look like this:

"John Smith" "" 3.123 "1234567890123"

So that FoxPro will know to skip the country field.  You don't include a line for the field names, for example:

"Name" "Country" "GPA" "PhoneNum"
"John Smith" "Germany" 3.123 "1234567890123"

when imported into FoxPro, you will get two records:

Name        Country  0      PhoneNum
John smith  Germany  3.123  1234567890123

( the "GPA" turned into a 0 because FoxPro can't assign a numeric value to the character string "GPA")

Let me know if you need more information.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
REReplaceNoCase help 1 43
move expression web site to a new server 13 53
Need help deploying my first MVC.Net app with a SQL Server backend 3 25
asp Google Map 2 27
Read about why website design really matters in today's demanding market.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question