Solved

Visual Fox Pro ???'s

Posted on 1998-10-13
1
209 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
Comment Utility
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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

771 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

10 Experts available now in Live!

Get 1:1 Help Now