Ask a Question related to ASP Database, Design and Development.
-
Thomas Henz #1
how to insert with id=increment
Hi!
I'm coming straight from php and mysql and I want to run this INSERT
command from asp.net to mssql with ID as PK and auto incremented.
ID PK int(4)
name varchar(50)
nummer int(4)
When doing e.g.:
INSERT INTO test (name,nummer) VALUES ('tom','2222')
it doesnt work because ID can't be NULL. Thats ok, but how do I change
it that ID gets autoincremented?
Thanks a lot,
Tom
Thomas Henz Guest
-
cfloop over a list - how to increment
:( I'm trying to look over a bunch of form fields, all of which have the same name. I can't get the loop to increment to the next iteration. Here... -
increment using update
I would like to keep track of how many times each user logs in. When a user fills in the form information on my login.html page it activates a PHP... -
Increment 'A'
Does anybody knows how to increment the 'A' so it will be 'B' and so on to 'Z'???? Thanx -
Time Increment
What is the smallest time increment that flash recognizes? I need something that is sensitive to the microsecond (.0000001 sec) Thanks -
What else will cause the SCN to increment?
Beside the "commit" statement, what else will cause the SCN to increment? Thanks -
Ray at #2
Re: how to insert with id=increment
Check out CREATE TABLE in Books Online.
[ID] [int] IDENTITY (1, 1) NOT NULL
(First one is the seed (start at), and second is the increment)
Ray at work
"Thomas Henz" <thenz@t-online.de> wrote in message
news:bikust$pbs$01$1@news.t-online.com...> Hi!
>
> I'm coming straight from php and mysql and I want to run this INSERT
> command from asp.net to mssql with ID as PK and auto incremented.
>
> ID PK int(4)
> name varchar(50)
> nummer int(4)
>
> When doing e.g.:
>
> INSERT INTO test (name,nummer) VALUES ('tom','2222')
>
> it doesnt work because ID can't be NULL. Thats ok, but how do I change
> it that ID gets autoincremented?
>
> Thanks a lot,
>
> Tom
>
Ray at Guest
-
Aaron Bertrand - MVP #3
Re: how to insert with id=increment
This was answered in a SQL Server group. Please don't multi-post.
"Thomas Henz" <thenz@t-online.de> wrote in message
news:bikust$pbs$01$1@news.t-online.com...> Hi!
>
> I'm coming straight from php and mysql and I want to run this INSERT
> command from asp.net to mssql with ID as PK and auto incremented.
>
> ID PK int(4)
> name varchar(50)
> nummer int(4)
>
> When doing e.g.:
>
> INSERT INTO test (name,nummer) VALUES ('tom','2222')
>
> it doesnt work because ID can't be NULL. Thats ok, but how do I change
> it that ID gets autoincremented?
>
> Thanks a lot,
>
> Tom
>
Aaron Bertrand - MVP Guest



Reply With Quote

