Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Upsizing GUID to UniqueIdentifier
Message
From
16/09/2005 08:10:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/09/2005 07:53:39
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01049183
Message ID:
01050205
Views:
75
My bad. Why would it need to be w/o nocptrans. You're right. I thought with nocptrans it'd evaluate first 16 chars (their asc values) and end up with wrong GUIDs. Haven't tried it but should work right.
PS:Probably for it didn't need the flag then.
Cetin

>>But don't forget if you use c(36 or 38) version do not use nocptrans. Directly definable as uniqueidentifier without that flag.
>
>I'm not sure about this part. I use c(36) nocptrans with the flag and everything is good. Without the flag, the conversion fails.
>
>I think that once the data being transfered is in the proper format at 36 or 38 ( i.e. with or without the brackets ) it doesn't matter if the nocptrans is set. If the 36 or 38 is formatted properly as a character string, DTS sees it as a unique id. I just tested sending one over without nocptrans and DTS treated it exactly the same the one with nocptrans.
>
>VFE also creates GUID(16) ( C(16) nocptrans ) using an algorhythm that was orginally, I think, written by Rick Strahl. They just look like a 16 char string with no dashes ( - ) DTS will only eat those if the NOCPTRANS is set. As C(16) character fields they are the wrong size
>
>( BTW, I didn't know these GUID(16)s could be converted this way! I thought I had to change field size and reformat them, padding them out. This is very cool! Hard to learn about these things using the VFP upsizing 'wizard' ( a sorcerer's apprentice at best ) since it does not even offer the option of uniqueid as a data type for conversion )
>
>Also very interesting the weird looking project that is created by the upsizing wizard if you ask it to generated code. Buried in there are sql scripts. I would think by now someone in the fox community would have written something to allow for search and replace mods on the memo fields storing the scripts followed by using those scripts with execsql to do a more sophisticated upsizing.
>
>I wish the DTS wizard would recognize the PK of the VFP table and make it unnecessary to hack the transform script, though. That is one thing the VFP upsizer wizard actually knows how to do.
>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform