Best Practice - Convert from VFP


Author
Message
Howard Bennett
Howard Bennett
StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)
Group: Forum Members
Posts: 57, Visits: 496
I'm converting a DBC to SQL using DDT...first time - so - having lots of questions!!!



What do you guys do with the default values? Do you enter them in the DDT and have that stored in the SQL database - or - is it best to leave that blank?



Also, what's best choice with regard to default values for primary keys and foreign keys - (-1 or 0)?



Lastly, what's the best way to get the data from VFP to SQL? Is there something in DDT that does that - or - am I on my own to write that code?



I figured some of you have already done this and would be able to help with some "gotchas" and things to avoid. Any help is greatly appreciated!



HB
Replies
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
I'm an old fox developer, and here's the way I use for migrating VFP to SQL (in addition to Charles, who is also an old fox).

First of all, migrate structure.

I use VFP9 Upsizing Wizard to migrate structure, because my dbfs are allways referenced in a dbc, and RI is implemented with its triggers - I had corrected a few bugs in its sources in order to manage varchar(max), and varbinary(max), but it seems that Rick Schummer's version is now without bug.
Upsizing wizard allows to add Timestamp fields (they are usefull for a good concurency management), and creates referential integrity in a declarative way (creates constraints, and not triggers).

Then, I use DDT on the new structure, on SQL server. I'found that way more simple than importing VFP structure from within DDT, but it is probably because I use VFP upsizing wizard for many years (and DDT only 2 years).

once your structure is ok in SQL, let you migrate data. Never use VFP uspizing wizard for that! never!

Before data transfer, check and check again the quality of your data, never forget that VFP is a lazzy language and a fuzzy storage (that's why VFP developpers may not be lazzy or fuzzy, and I love VFP Kiss , but I know its bugs). For exemple, in VFP, a field N(5,2) should hold nothing larger than 99.99 Try it, and you will see that you can store whatever bigger value you want, and the fox will not raise any error.
But when you try to transfer this row in a SQL table, you'll get a splendid crash Blink (I still remember the first time I got it: more than a week in debugging to find it, and write this tiny prg to detect it in all dbfs)

With my customers, I use 2 ways to transfer data. Some prefers to push data from VFP into SQL, using remote views in Fox. Others use importing wizard in SSMS (wich in fact uses SSIS). I've tried using dbfs as a linked server in SQL, it runs without problem, but is slower than SSIS.

Don't worry about null, but check VFP specific syntax in default values and validation rules in dbf.

And enjoy SQL and StrataFrame !

Howard Bennett
Howard Bennett
StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)StrataFrame Novice (83 reputation)
Group: Forum Members
Posts: 57, Visits: 496
Thanks for the advice!



I've got most of the structure setup in DDT and will be finishing that up this week - then on to moving the data. I'll be coding all that as there are some significant structure changes and I won't be able just to move data with a third party product. Should be fun!



It's good to know there are people who've done this and that I can come back here for help!



HB
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Howard Bennett - 15 Years Ago
Charles R Hankey - 15 Years Ago
Howard Bennett - 15 Years Ago
Edhy Rijo - 15 Years Ago
Charles R Hankey - 15 Years Ago
Charles R Hankey - 15 Years Ago
Howard Bennett - 15 Years Ago
Russell Scott Brown - 15 Years Ago
Michel Levy - 15 Years Ago
Howard Bennett - 15 Years Ago
Charles R Hankey - 15 Years Ago
Howard Bennett - 15 Years Ago
Michel Levy - 15 Years Ago
Charles R Hankey - 15 Years Ago
Michel Levy - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search