I have a form that inserts records, I want first to generate an unique ID before submitting the form and assign it as the ID for the records that I will submit/insert.I am using MySQL for my DB.
| SitePoint Sponsor |
I have a form that inserts records, I want first to generate an unique ID before submitting the form and assign it as the ID for the records that I will submit/insert.I am using MySQL for my DB.


Don't use an identity or autonumber column then.
There are functions that can generate guid's from asp code, google should turn something up for you.
In most cases it's pretty easy to retrieve the recently created autonumber back to your asp page that did the insert, maybe that would work better for you.
Doug G
=====
"If you ain't the lead dog, the view is always the same - Anon




Here is some sample code to generate GUID
http://www.aspkey.net/aspkey/_blog/i...guid&Submit=Go

Thanks a lot for the link...as I am searching for the same form last many days.
Bookmarks