C# - 18 Digit Unique ID - Code Reliability?

Jun 26, 2010

I want a number that would be unique forever, I came up with the following code,
it generates a number and adds a check digit to the end of it, I would like to know how reliable is this code?

public void GenerateUniqueNumber(out string ValidUniqueNumber) {
string GeneratedUniqueNumber = "";
// Default implementation of UNIX time of the current UTC time
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
string FormatedDateTime = Convert.ToInt64(ts.TotalSeconds).ToString();
string ssUniqueId = DateTime.UtcNow.ToString("fffffff");.......

EDIT: clarification GUID can not be used, the number will need to be entered into a IVR system via telephone keypad.

View 10 Replies


Similar Messages:

Generate 8 Digit Unique Id In C#?

Dec 12, 2010

I need to generate 8 digit unique id in c#. On my site a user will register and I need to generate a unique id for him in c# code(I don't want this logic in DB), after inserting the id I need to save it in database.

Edit: I need that numbers to be generated in random manner everytime.

View 6 Replies

Databases :: Separate Zipcode In Excel / Need To Get The 5 Digit Zip Code

Jan 19, 2010

We have a spreadsheet that has a Zip column. These zip has a plus 4 digit in this format 99999-9999. When I looked at the format of this cell, it was a Special format with Zip+4 type. I just need to get the 5 digit zip code but the problem I am running into is the leading 0s. I tried =LEFT(A2, 5) but this trims the leading 0s. I also tried highligiting the column, then DATA -> Text to Columns -> Delimeter with hyphen but that didn't work. Is there any other way to do this or am I missing something on my first two attempts. Please let me know if you need more clarifications.

View 4 Replies

Controls :: Verification Of User Using Mobile Number By Sending 6 Digit Code As SMS

Apr 27, 2013

I want to add verification of user by sending 6 digit code to his mobile number during registration. Any way how can i do this.

View 1 Replies

C# - Luhn Check Digit / Produces 2 Length Check Digit Values?

Jun 26, 2010

I cant seem to figure out what is wrong with my check digit code!

At times, it produces 2 length check digit values

Example

1277531815000110 <-- check digit is double value??????
1277532495000110 <-- check digit is double value???????
1277534649000110 <-- check digit is double value???????
127753185300011 <-- good!
127753208500019 <-- good!

All generated numbers are valid, it can be checked at http://www.ee.unb.ca/cgi-bin/tervo/luhn.pl?N=127753224800013

CODE: http://tinyurl.com/352acpj

View 1 Replies

SQL Server :: How To Generate A Unique Code

Oct 19, 2010

I have to generate a unique customer code like this-

'cbd'+first letter of customer name+incrementer

here

cbd is hard coded means reamain fixed in each customer code first letter of cust_name is like

Bell Companies- B

and incrementer must be four digit number like 0001,0002,0888 etc.

Here incrementer

should start with 0001 for each customer means for EX-

BELL COMPANIES - CBDB0001

then it should increment for customers having name started with B

TEL POWERS- CBDT0001

then it should increment for customers having name started with T

View 4 Replies

Simulate The Experience Of A Unique User Through Code In A C# .net Web Application?

Mar 7, 2011

we have an ASP.net web application running on IIS7. We have multiple users, but we don't always know their password. Here's what we'd like to be able to do:

Login as some sort of administrator, be presented with our current list of users, click some sort of "Run as John Doe user", at which point we'd be able to see the application (or certain pages) as that user.We're looking to do this in a support/debugging capacity. I've looked into ASP.net's Impersonation, but that doesn't seem to apply here.

View 1 Replies

Active Directory/LDAP :: Get Unique ID Of UserName / Is GUID Is The Unique Id Of Each User

Nov 23, 2010

How to get Unique ID of LDAP logged in User? Is GUID is the unique id of each user?

View 1 Replies

Web Forms :: Is GUID (globally Unique Identifier) Unique

Aug 25, 2010

Is GUID (globally unique identifier) really unique, or it can be duplicate.

System.Guid.NewGuid().ToString()

View 6 Replies

Unique Number For Unique Visitor On Button Click In Vb.net?

Mar 21, 2011

How generate the unique no. 1,2,3 and so on .... on button click of each new user ..

the code mentioned below is a readwrite coding in vb.net ...

but the problem is it generate the same id for different users on button click event... but i want the no. of times button clicked the new ids will be generated

[code]....

View 1 Replies

Associating A Unique Session Id With Every Unique User In C#

Mar 18, 2011

How can I get unique session ID for every unique user who logs in ?? I'm using asp.net/c#

View 1 Replies

How To Display Data With Unique Value And Count Of That Unique Value

Feb 11, 2010

How To Display Data In Following Format?

In the Format below abc has multiple occurance which count is displayed in brackets as 2669.

[code]....

View 7 Replies

Access :: MS Access Reliability For Light Usage?

Dec 6, 2010

The app is a small .exe to be installed in multiple machines. Each will access the db to get/update a field in a table and should be less than 1000 calls to it per day. I'm concern about the "locking" error message that I sometimes encounter (rarely) when running the program. Maybe increasing the default timeout would make it wait longer until the db is no longer locked?

View 2 Replies

Generating New Unique No From Another Unique No?

Feb 25, 2010

I am here with a task to generate a unique no of specific length from another unique no.

I want my target unique no of say z length to be generate from combination of a unique no [ that may be a serial no ] of say x length and any secret key of say y length.

View 8 Replies

How To Generate A Random Number Of 16 Digit

Mar 7, 2010

I want to generate a 16 digit random account number that should be unique in database for every new user of my website. kindly guide me how can i generate a 16 digit unique number.obviouly i understand that i would have to check that number in my database table for uniqueness and if that generated number already exist then i would have to generate it again.

View 11 Replies

Display Integer As 3 Number Digit

Feb 11, 2010

When I read an integer, I cannot display it as a ### digit ..

code:

[Code]....

View 3 Replies

C# - Convert 6 Digit Number To Time?

Jan 10, 2011

Is there a function in .net that will take a number such as 134,501 and convert it to time? That time would be 1:45:01 pm. I was hoping i didn't have to reinvent the wheel for this.

View 1 Replies

Converting A Dropdown Selection To A Two Digit Number?

Nov 15, 2010

I have a dropdown list which has items bound to it using sql datasource.

In the database i have the numeric values corresponding to each item.

Now there are many such dropdown list's and on selection of each item i want to form a 14 digit numeric code,which i need to use further for some more functionality.

How can i convert a selected item from a dropdownlist to a numeric digit??or how can i bind the items in the dropdownlist to a database having numeric value for each item?

E.g if i select 'WT' from dropdown list the corresponding value for it in the database table is 39 so on form submit i want '39' to be formed in codebehind. likewise on selection of all items from different dropdown list the digit formed using codebehind should be '15487523568955'

View 2 Replies

Web Forms :: Creating A 4 Digit Sequential Number?

Nov 23, 2010

I am using C# 2.0 and ASP.NET.

How to create 4 digit Sequential Number (0001 to 9999).

I have a web page, where students save their information. When the students submit the page, I want to add the string "Stu" followed by the 4 digit sequence number. The sequence number should be unique. The sequence number should increment to the next sequence, when a new record is getting added.

How to achieve this?

View 1 Replies

Generate Check Digit Using LUHN Formula?

Jan 11, 2011

Could anyone please give me some code to generate Check Digit base on LUHN formula. Suppose i pass 15 digit of credit card number then fuction should calculate and generate the Check Digit.I found some link but it is MS SQL function and i tried it work well except if check digit is 0 it will return 1 so i get confused, because some time Check Digit is also 1 so in both cause this function returning 1.http://www.codeproject.com/Tips/120472/SQL-function-to-verify-Check-Digit-of-given-VISA-M.aspxI will appreciate if some one can give me VB code.

View 1 Replies

Web Forms :: Validation Expression For Digit With Point?

Jan 28, 2011

how to set the validation expression for digit with point?

example: 0.25, 0.3, 0.006, 0.5 ???

d+$

View 4 Replies

Only Digits, The Digit May Be Decimal / How To Write The Regular Expression

Jan 27, 2010

in my web application i want to validate that user can enter only digits and the digit may be a integer or decimal how can i write the regular expression for this.

View 2 Replies

C# - How To Make Validation For A Textbox That Accept Only Comma(,) & Digit

May 22, 2010

I am working on a website. I am using C# 2008. I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199.

I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property->Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,).

View 2 Replies

SQL Server :: Converting 6 Digit Float Type Time To Hr Min Sec

Jan 4, 2011

I had a 14 digit create datetime and resolved datetime in float time format and I could parse the date using following conversion:

CONVERT(datetime, LEFT(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),8)+' '+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),9,2)+':'+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),11,2)+':'+
SUBSTRING(CAST(CAST(is_resolved_datetime as BigInt) as varchar(14)),13,2))

If I were to extract only the time difference of two datetimes in hr:min:sec.

View 7 Replies

Access :: Error Importing 13 Digit Numbers Into Access2010?

Dec 9, 2010

I have a project that I have to import a text file. comma delimited values, into an Access 2010 database...I am experiencing a big problem that I have no idea how to work. I have two fields in the file that are 13 digit numbers... all my columns in the table are Text (255) yet this 13 digit number is causing the Data connection to close instantly with no data saved.When I look at the data in Excel it looks like this...4.76334E+15 in Notepad 4763341000002623 (the true and correct value).If I use Access import text tool in Append mode the table it crashes. If I use the same tool but this time tell it to create a NEW table it works.Error Msg...Microsoft Access was inanble to append all the data to the table.

The contents of fields in 0 records were deleted, and 0 records were lost due to key violations.*If data was deleted, the sata you pasted or imported doesn't amtch the field data types or the fieldSize property in the destination table.*If records were lost, either the records pasted contain primery key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables.Do you want to proceed anyway?Why is Access crashing and what can I do to resolve the problem?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved