Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VPF 9 beta questions

Status
Not open for further replies.

bjdobs

Programmer
Mar 11, 2002
261
CA
been a long while since I cracked a Foxpro IDE (version 2.5) ... in the beta version of VPF 9 the limits for a Database Field name is 128 and a free table is 10 ... yet I cannot updload a csv file exported from ACCESS that appears to have more then 10 but fewer the 128 characters

The dialog for the upload wizard allows one to select between a database or freetable ... so I selected Database

I tried to make a connection to Access ... it indicates my connection is fine but I can't seem to list or view the tables in the connection

Is this just because this is a beta version or is this the extent of VFP?
 
There isn't an "Uploading Wizard" in any version of VFP I've seen. <g>

If you want to IMPORT a csv file, you'll have to create a dbf with the right structure and APPEND FROM (file) TYPE CSV. The up*SIZING* wizard is for sending data from VFP to an external data source (Access, SQL-Server, etc.).

One common problem people encounter when connecting to Access is that Access allows field names with spaces. Almost no other database product will support that.
 
Access also allows names that start with numerical values which also chokes VFP.

There are some decimal issus, but if your data doesn't have more than 2 decimals there are no worries. CHeck out the Access import FAQ in forum1251

Brian
 
Actually VFP 9 beta does have an import (upload is my terminology sorry) wizard that allows an import without first creating the table and structure. I was able to import my first csv file, but then the next file would not import ... the only thing that I can determine is that some of the labels are larger then 10 characters. (Field names contain no spaces and all start with Alpha characters) ... there are also about 40+ fields in the CSV file that is failing (not sure what the VFP limit is)

I generated the CSV's from the same access file that I attempted to connect to ... I set all fields to strings:

"Blahstring","BlahDate","BlahNumeric" etc

so there should be no issues with data content

My purpose for trying VFP

Familiarity to the FoxPro world

My expectation was that I could simply use Foxpro's IDE to create a new user interface for an existing Access Database.

It looks like I will have to completely restructure the tables in order to do this.

I believe MS bought FOX Software to get the Rushmore algo's and thought that was going to be the end of Foxpro ... very supprised that Foxpro is still thriving after all these years yet disappointed that MS appears to have stunted the Cross Product connectivity. Office Products all connect to almost any file type with little or no effort ... there should be no reason why Foxpro (now a MS product) would be any different.

 
Bjdobs,

The first thing you should do is to determine where the problem lies: is it in the CSV exported from Access, or is it in the process of importing that CSV into VF? Open the CSV in a text editor and examine the field names. For that matter, you should verify that the field names are in fact present in the CSV.

If you still think the problem is with VFP, check that the table is in fact in a database.

Also, try running the import from the command line, using the IMPORT command, rather than the wizard. That will help eliminate any problems caused by the wizard itself.

I believe MS bought FOX Software to get the Rushmore algo's and thought that was going to be the end of Foxpro

Not true. They bought it because it was the best xBase product around at the time (and still is), and there was a huge unsatisifed demand for a Windows version of xBase.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
bjdobs,
I'm also curious why you would bother exporting to CVS format from Access and then importing that in VFP. There are at least three better solutions:
1) In Access export to a DBF.
2) In VFP attach to the Access table (i.e. open a remote view) and simply copy it to a DBF.
3) You "could simply use Foxpro's IDE to create a new user interface for an existing Access Database" by using a remote view to the Access table.

Rick


 
Thanx I will look into Remote view ... the CSV files already existed for another task ... and I did try a connection but I wasn't able to view the access tables
 
Starting to wonder if the VPF9 beta is working properly ... I can make a connection to the access data base however when I attempt to do a remote view it keeps wanting store the view back in the access mdb file but then fails with an error.

I attempted to export a DBF from Access and of course the standard xbase files fail because the Access field names are larger then 10 characters ... I down loaded the ODBC driver for VFP but haven't figured out how the export is supposed to work with the VFP ODBC driver ... My understanding of ODBC is it is a connection tool not an export/conversion tool ???

I think I am going to have to go back and slug it out with the Access IDE ... I'm quickly running out of time.
 
Bjdobs,

I can assure you that the VFP 9.0 beta is not at fault in this case. Nor is there a problem with long field names. I have often downloaded Access data into VFP using ODBC, and it really does work.

Although I could probably talk you through the steps, it seems that you have abandoned this approach, so I won't bother. I hope you manage to solve the problem.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top