Creating a unique string index when adding a row

B

Bob Day

Using VS 2003, VB.net, MSDE...

I need to create an arbitrary unique STRING index when I add a row from a
DataTable to its datasouce.

I have tried using DateTime, but don't see it working (it is not always
unique).

Question 1) Creating a GUID is unique, but is it unique when converted to a
string, such as the following:
Dim UniqueIdentifier1 As String = Guid.NewGuid.ToString

Question 2) Is there a (another) simply way of creating a unique string
index on the fly while adding a row?

Thanks

Bob
 
S

Steve Willcock

Hi Bob,

In answer to question 1, yes it is still unique when converted to a string.

In answer to question 2 - probably nothing as easy as using a GUID if you
have to use a string datatype for this.
 
B

Bob Day

Thanks again for your help, Steve.

Bob

Steve Willcock said:
Hi Bob,

In answer to question 1, yes it is still unique when converted to a string.

In answer to question 2 - probably nothing as easy as using a GUID if you
have to use a string datatype for this.

--
Steve Willcock (MCSD for Microsoft.NET)
http://www.willcockconsulting.com/


to
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top