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
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 your response - very helpful!



I do have Full Convert and it seemed to work well - but - I was afraid of all the NULL values...there seemed to be a lot of people who warned against using NULL's. I seem to recall that some of the tutorials from SF mentioned not allowing NULL's - maybe I'm dreaming that.



But, let's say that I've decided to go ahead with using DDT for the structure and I'm going to write code to take the data from VFP and copy it to the SQL tables (because I've made a lot of progress toward that goal.) If I don't allow NULL's - am I okay - or - do I need to allow for NULL values?



Also, if I do put default values in the actual table structure - is that okay? That is do I have to do that again in the BO Mapper?



Thanks again!



HB
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Howard,

Adding to the good posting from Charles, let me help you clear some issues...

But, let's say that I've decided to go ahead with using DDT for the structure and I'm going to write code to take the data from VFP and copy it to the SQL tables (because I've made a lot of progress toward that goal.) If I don't allow NULL's - am I okay - or - do I need to allow for NULL values?

The data in SF is view through the SF Business Object's properties (much like a VFP cursor or view) in the SF BOM you have a facility to tell those properties how to handle null values so it will not generate an error while using the BO's properties in your forms, reports, etc. In other words you can tell the BO property that when a database null value is found to replace it with a default value that you will specify like in Charles example above with the datetime field.

Also, if I do put default values in the actual table structure - is that okay? That is do I have to do that again in the BO Mapper?

Yes that is OK, but if these tables will not be used outside of SF, it is better to have all those settings in the business object's itself, so when you use the BO from a WinForm or a Web application it will enforce the rules you defined at the BO level.

On a side note, be aware that SF supports reading/writing to VFP tables, so if this is a commercial application type which will be installed in several places, you could just build the VFP import process in the SF application by creating VFP business object and do all your logic in SF.  I have not done that, but I will use that logic in one of my projects for a VFP application I am re-creating in SF.

Edhy Rijo

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