Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BCP and VFP Memo fields
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01230554
Message ID:
01230652
Vues:
17
>
>Still wrestling with the GUID(16) thing but didn't want to try to hack your BCP util to account for that if in the end I couldn't get the memo fields over that way anyway.

Well that's just easy. One line of code when building the statement to export the flat file to add the dashes and pad out with some fill characters. This assumes there's a good way to identify the guid fields.

>
>Unless an answer in the other thread shows me how to cast the guid(16)s as UID in one SSIS pull, I think I'm going to have to resign myself to an intermediary step of converting the GUID(16)s to GUID(36) in VFP before asking SQL to understand them. ( though I would swear that in DTS I was getting it to see the GUID(16) as a binary 16 and making a UID out of it )

I don't really see how this is a big deal. I think I've even written a program that goes through an entire database, alters the size of all "cpk_" and "cfk_" fields to c(36) binary, and pads them to GUID(36).

Usually when I am converting data, I creates a program that pulls the current data into a cursor or view that matches the SQL structure. From there you can BCP, sqlexec(INSERT) or use an updatable view. Using SSIS/DTS directly is never an option for me because something always needs some massaging. And I have a program that takes an existing fox DBC and creates the bare-bones conversion PRG which I can then refine.

If conversion speed is an issue, than you should fix the data in VFP and use BCP. It is a LOT faster than any other way. (if done properly) If speed is not an issue, than why go to the trouble of using SSIS when you can solve all of your conversion problems with a VFP PRG?



>
>
>
>
>>>Exploring options for migrating VFP data to SQL 2005.
>>>
>>>I don't know much about BCP but do I understand correctly that you can't move VFP memo fields to SQL Text or VARCHAR(x) this way?
>>
>>I have never had luck using BPC for memo fields, but I gave up rather quickly when I realized the extended computer time to import the memos using a view or SQLEXEC() was a lot cheaper than my time to figure out the BPC, assuming it was even possible.
>>
>>Since BPC is importing a text file, it didn't seem possible to find a delimiter that would work universally. On the other hand, decent documentation on BPC is very hard to find, so maybe there is some other way I never found.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform