Solved

Visual Fox Pro ???'s

Posted on 1998-10-13
1
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 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