Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to insert new record in 2.0

Thread Tools

How to insert new record in 2.0

yazzy yazzy is offline
Junior Member
Join Date: Jul 2006
Posts: 1

I am very very new to ASP.NET 2.0 and C#

I have a simple form and i need to insert a new record.

I used the following query

(ProjectID, Title)
VALUES (@projectID, @Title);
Select FeatureID, ProjectID,Title
From Feats
Where (FeatureID = SCOPE_IDENTITY())

But i got an error

Cannot insert the value NULL into column 'FeatureID', table 'CRM.dbo.FeatS'; column does not allow nulls. INSERT fails.

Could someone please help ?

Thanks in advance
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Adding new record using previous record information... help!! Maximus ASP General 2 04-12-2007 09:55 PM
How to insert a new record in detailsview when there are no record Frits van Soldt ASP .Net Web Controls 2 11-17-2005 09:18 AM
insert new record in Access dbase AND retrieve autonumber loreille ASP .Net 1 10-28-2004 06:57 PM
insert record using stored proc returns no error but doesn't inserd record ASP General 1 01-09-2004 04:53 PM