how to generate a unique random number on a form submission?

I want to generate a unique random number everytime a user submits a form. As the form is submited the data of the form should be placed in a database and a unique random number should be generated so that the user can later use this unique random number to reterieve his details from the database that refer to his unique random id. The unique random number should be atleast 9 digits long. Please help me on this.

I am wondering if it is possible to change the starting point of the ID field within sharepoint.ÃÂ It starts at 1.ÃÂ I would like it to start at 1000. and add 1 number each time a new infopath form is added. Or would I add a different field to accomplish this.

I want to generate a unique random number everytime a user submits a form. As the form is submited the data of the form should be placed in a database and a unique random number should be generated so that the user can later use this unique random number to reterieve his details from the database that refer to his unique random id. The unique random number should be atleast 9 digits long. Please help me on this.

I need to create a unique invoice number based on three parts: Salesperson's initials + date (represented as yymmdd) + a unique number (perhaps the time? but it has to be listed without any formatting, just HHMM)

I am writing a matching program, and need 24 objects to randomly appear,
each twice, across 48 spaces. I figured the best way for me to do this
would be to assign the positions a number 1 through 48. but the problem
is I can't find a way to generate a random number sequence in visual
basic 9 .net

I found many examples in visual basic .net but the conversion doesn't
work. If not some code, many some example programs that either use a
random number sequence or randomly sets the position of objects.

Hi there,
I have an issue with an update of a column with unique random generated values, using SQL 2005.
What I want to achieve is to create unique username for a list of let's say 1000 rows. My approach, which may be wrong, is as follows: to create a view to retrieve a random generated number of 7 digits; to use a function that retrieves the number from the
view and checks if it is unique in the table or not (if it is, the number is returned, if it is not, a new one will be generated and so on); to update the table using that random generated number.
The problem is that it does not work. It does not generate unique numbers, not all the times (you have to test by running the code few times). I suspect it is something with the update, but not sure how to solve it.
Here are the steps to reproduce the problem.
Create the table:
CREATE TABLE [dbo].[TB_Temp](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ADM_USERNAME] [nvarchar](7) COLLATE Latin1_General_CI_AS NULL,
) ON [PRIMARY]
Add some test rows:
DECLARE @i INT
SET @i = 0
WHILE @i <= 1000
BEGIN
INSERT INTO TB_TEMP
(ADM_USERNAME)
VALUES ('')
SET @i = @i +1
END
Create the view to random generate 7 digits numbers:
CREATE VIEW vw_RandNumberForAdminUserName
AS
SELECT ROUND((9999999 - 1000000 - 1) * RAND() + 1000000, 0) AS RandNumber
Create the function to retrieve the unique 7 digits number:
CREATE FUNCTION [dbo].[fn

I have my code behind from my webform and it does everything but write to the database. The form comes up I can fill it out then click the button and it takes me to the thankyou.aspx page but no entry in the database. I can't find what I am doing wrong.using System;using System.Data;using System.Data.SqlClient;namespace orderfinal{ public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnSave_OnClick(object Src, EventArgs E) { if (Page.IsValid) { // Define data objects SqlCommand comm; // Open the connection SqlConnection conn = new SqlConnection(); &n

I want a list column that will generate a unique id everytime a new item is added to the list. The item will have a predefined prefix and then add a number. All the ones I have tried from other sites have failed.

Hi There,
I am looking to find out a way to uniquely identify a mobile through ASP.NET. Like mobile no. or IMEI or any other unique Identifier. Is it at all possible?
Looking for some help.
Thanks
Bhaskar

Hi everyone,
I'm pretty new at ASP .NET but not to ASP. I've got a form I need to create where I don't know how many entries will be added. It has the following format:
"Age" "Duration" "Period of Duration" "etc..."
Last30Days
1-5 Months ago
6-11 Months ago
Age
Age
Age
etc.
So the Age column always has the first 3 options and then an unknown number of Age values that can be inserted. I've created a table that has the first four fields (Last30days, 1-5months, 6-11months, age) and I was thinking I could just order by those 4 columns for display. The problem I have is I'm not sure on how to proceed. Does anyone have any good ideas on how to handle this situation? Ideally data entry people could use the same form for both entering and displaying the data. Thanks.