[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unique Strings as Record ID's

Posted on 2007-07-24
17
Medium Priority
?
223 Views
Last Modified: 2013-11-24
Guys, I am working at a client's on a conversion of a competitor's product  They have a Unique field string that I have not figured out where it came from.  Typical field data in a parent dbf table (where it is utterly unique) is like:

D46D40C3-E282-425E-BC39-68DFAFA70514

or

F366001C-0EC3-418B-88B7-F48D03B62751          

Of course a child table may repeatedly access these unique strings.  The question is WHERE did these unique strings come from?

Frank
0
Comment
Question by:fmoore0001
  • 8
  • 5
  • 2
  • +1
17 Comments
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19558988
Are those GUID strings?
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19558998
I only asked because I know they are weird like that but I don't use them.

GUIDGeneration Code
http://fox.wikis.com/wc.dll?Wiki~GUIDGenerationCode~VFP

GUID
http://fox.wikis.com/wc.dll?Wiki~GUID~VFP
0
 
LVL 18

Expert Comment

by:DarrenD
ID: 19558999
Hi,

When you say come from? What do you mean. How were they created?

They look like GUID's to me.

Darren
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:DarrenD
ID: 19559025
C#

MessageBox.Show(System.Guid.NewGuid().ToString());
0
 
LVL 3

Expert Comment

by:Nico
ID: 19559062
Yup, Guid. And even in .NET's default format... Do Guid.NewGuid().ToString() and see for yourself :o)
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19559091
* VFP 7+ using WSH
oGUID = CreateObject("scriptlet.typelib")
cGUID = Strextract(oGUID.GUID, "{", "}" )
0
 

Author Comment

by:fmoore0001
ID: 19560368
Carl, what is the object or library scriptlet.typelb")

Frank
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19560445
I really don't know.  I just know it works on my PC and was an example in one of the links I listed above.
And, Windows Script Hosting is the mechanism that allows it to get called.
0
 

Author Comment

by:fmoore0001
ID: 19560481
Hmmm, I am wondering if it is a native DLL in all Windows systems?

Frank
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19560503
I would look in the registry first for references on it.
0
 
LVL 33

Accepted Solution

by:
CarlWarner earned 2000 total points
ID: 19560516
Another VFP reference:

How To Obtain a GUID in Visual FoxPro
http://support.microsoft.com/kb/269387/en-us
0
 

Author Comment

by:fmoore0001
ID: 19560567
Carl, the last one was the key.  Thanks.

Frank
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19560574
Super!
0
 

Author Comment

by:fmoore0001
ID: 19560991
I rewrote it as my own, since it uses ole32.dll (a DLL that seems to be in all Windows versions).   I set up GUID.prg as a function to return the GUID string for any situation.

Frank
0
 
LVL 3

Expert Comment

by:Nico
ID: 19562894
why was this in the c# section? and how did CarlWarner know that you were using VFP? *confused*
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 19562940
He used the new feature where you can post in multiple sections (inadvertently maybe).  I only saw it in the FoxPro section and wondered why folks were giving C# answers. ;)
0
 

Author Comment

by:fmoore0001
ID: 19565731
If I posted it in the wrong section, it was inadvertent.   This item does belong solely in the VFP section.  Carl knows I am working in VFP from many past questions he has answered.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question