I just want to get a unique INT value to assign it to every record in database as primary key, any API can do it? Any related information is appreciated.
Printable View
I just want to get a unique INT value to assign it to every record in database as primary key, any API can do it? Any related information is appreciated.
a unique INT? You mean through different app-starts?
You can store Your value in the registry or in an ini-file and increment it.
Hope this helps :confused:
Mikey
May be CoCreateGuid() or UuidCreate() or UuidCreateSequential() suite your needs. These are usually used for generating a unique 128-bit integer in M$ plaftorms.
Why not just use an autonumber field in the database???????