I need to be able to have a hidden field that genterates a unique identifier eveytime a user fills out the form. This identifer will be inserted into my DB along with the rest of the info from the form. Is there a way of doing this? I am using the auto-incrememt on a field in the DB but there is no way I can use it to do what I want. SO, if any one can help I would appreciate it very much..
Having the unique identifier created in sql after you submit the form is the way to go. The table index is perfect for that. Although you say you can't use it.
Is the reason why you cannot use the table index as the unique identifier because you need to know it before it is created? If so - you could add an entry - then use the MAX function to get the index id.
Maybe - post why you can't use the index and perhaps there is a way to use the index. Using the index will be certainly the best way to do it.
I'm not very clear to your question. Usually, when you create a table you can have a primary key on a field which is unique. After you set number of the Identity Increment, the value will be increased by the number automatically when you insert a row of data. Can you tell us why you need a hidden field with unique value?
I need to be able to have a hidden field that genterates a unique identifier eveytime a user fills out the form... I am using the auto-incrememt on a field in the DB but there is no way I can use it to do what I want.
I agree with others that have answered that the apparant natural way to go would be to find or calculate what the new autonumber would be. But if that really can't be done as you state (for whatever unknown reason), then perhaps create something on the spot based on the current system date/time somehow...