auto generate Number

auto generate Number

am 08.12.2006 07:14:34 von G

Hello Firends

I want a sample code for developing an " auto genearte number " and want to
store in database.

Please if you find any code please send

Thanks in Advance
G

Re: auto generate Number

am 09.12.2006 22:51:40 von anthonybrough

Hi G

This would probably better posted to another group. however I have
found that it is better to allow the database to generate the the
number for you. If using access then try AUTONUMBER, if using oracle
then use a sequence to generate the number Not 100% sure about SQL but
I believe you can us @@Identity.

Reagrds


Tony

G wrote:

> Hello Firends
>
> I want a sample code for developing an " auto genearte number " and want to
> store in database.
>
> Please if you find any code please send
>
> Thanks in Advance
> G

Re: auto generate Number

am 09.12.2006 23:27:26 von Mike Brind

SQL Server has an auto-increment field. @@Identity gets the value of the
identity column of the most recently added record using the same connection.

--
Mike Brind

wrote in message
news:1165701100.541225.214210@n67g2000cwd.googlegroups.com.. .
> Hi G
>
> This would probably better posted to another group. however I have
> found that it is better to allow the database to generate the the
> number for you. If using access then try AUTONUMBER, if using oracle
> then use a sequence to generate the number Not 100% sure about SQL but
> I believe you can us @@Identity.
>
> Reagrds
>
>
> Tony
>
> G wrote:
>
>> Hello Firends
>>
>> I want a sample code for developing an " auto genearte number " and want
>> to
>> store in database.
>>
>> Please if you find any code please send
>>
>> Thanks in Advance
>> G
>