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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VFP8.0 to create FP2.6 tables 2

Status
Not open for further replies.

dsandlin

Programmer
Jul 11, 2003
56
CR
I need to create tables using VFP8.0 that can be used by FP2.6 equipped clients. My need is two-fold:

1. Using the "CREATE TABLE" command.

2. As the output of an SQL-SELECT statement.

Does anyone know of a trick, magic keyword, registry hack, or ANY way to keep from having to go into 2.6 to create the tables and then populating them with 8.0?

 
dsandlin,

Once you've created the table (either with CREATE TABLE or SELECT - SQL) you can copy it to another table using the COPY TO... TYPE FOX2X command. I would suggest creating cursors and then copying them out as 2x tables:

Code:
CREATE CURSOR MyTemp (pk C(8))
...
SELECT MyTemp
COPY TO MyTable TYPE FOX2X
- or -

Code:
SELECT * FROM ThatTable INTO CURSOR MyTemp
...
SELECT MyTemp
COPY TO MyTable TYPE FOX2X

Andy
 
dsandlin,

I'd go along with Andy's suggestion. Just be aware that if the table contains any "new" VFP data types (such as Datetimes), you could lose part of the data when you copy to Fox2X (for example, you will lose the time portion of a datetime).

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks, Andy and Mike, for your posts!

That was exactly what I was looking for and it will help me a lot to avoid manual processing.

Stars to both of you!!


Regards, Dick [laser] [roll1]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top