Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Upsizing GUID to UniqueIdentifier
Message
De
14/09/2005 13:06:45
 
 
À
14/09/2005 05:10:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01049183
Message ID:
01049541
Vues:
38
But if vfp stores it as c(16) nocptrans it is still just a 16 char field and will not upsize to a Uniqueid.

Remember, in upsizing the idea is to automate the creation of the SQL table, and to move all the data to the SQL server database. If I have a field with c(16) the only thing I can upsize it to is c(16), no? If I then try to change the data type of a char (16) to uniqueid in SQL server it won't translate.


>Evan,
>To SQL server it doesn't matter. 36,38 char formats are equally recognizable as a uniqueidentifier (and 16 bytes formats too, in SQL server it's 16 bytes). IOW to SQL server these are same uniqueidentifier values:
>
>'36DE74B0-5920-4F58-8060-BDA8E7BE37B7'
>'{36DE74B0-5920-4F58-8060-BDA8E7BE37B7}'
>0xB074DE362059584F8060BDA8E7BE37B7
>
>PS: If VFP is storing it as c(16) then must have nocptrans to prevent code page translation.
>Cetin
>
>>Hi Charles,
>>
>>Do your char(36) values have beginning and ending braces? If not, try making them char(38) then adding the braces to your strings with REPLACE ALL and see if that makes a difference...it did for me once before.
>>
>>Just a crazy, off the cuff idea, but HTH.
>>
>>>Kardeşim
>>>
>>>Perhaps I don't understand your answer. I have a vfp table I want to convert to a sql server table. My char(36) field looks exactly like what I see in a uniqueid field, but in using either DTS through the vfpoledb driver or going from VFP to SQL with the upsizer I do not seem to have the option of telling SQL I want this information to be seen as a uniqueid.
>>>
>>>I have been able to use this field information with SPT and it does indeed match values in sql. My remote views generate these keys on the front end and they are accepted by sql with no problem.
>>>
>>>I am just lazy and looking for an easy way to convert existing VFP tables to SQL tables and not have to manually change the char(36) fields in sql to uniqueid.
>>>
>>>Sağol
>>>
>>>>
>>>>Charles,
>>>>I didn't use upsizing but with SPT and alike SQL server recognizes 36,38 bytes versions, 16 bytes version and strconv(x,15) version.
>>>>Cetin


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform