Solved

Visual Fox Pro ???'s

Posted on 1998-10-13
1
212 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now