Uniqueidentifier inserting help (ASP)

Capodecina
Permabanned
Joined
31 Dec 2003
Posts
5,172
Location
Barrow-In-Furness
Now I can't even work out how to get in to insert when using a uniqueidentifier for ID fields.

Trying to setup a page to insert projects using a DetailsView control. Obviously when inserting the ProjectID field should be hidden and should auto-generate, how do I go about doing this?

If I just remove the field from the DetailsView and the INSERT query then it shouts at me because uniqueidentifiers can not contain null values. How do I get it to automatically generate this and hide it from the user?

Please help :(

Thanks for the help so far guys you've been great :)
 
Afternoon,

Is this the same problem?

http://forums.asp.net/p/912783/1027200.aspx#1027200

If not, this post might help: -

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=135210&SiteID=1

I noticed this post from the above URL don't know if will help: -

1) Delete the column or control (in the formview) that is bound to your id field.
2) set either as read only (in the DetailsView you can setup the property hide on insert to true).
3) Remove the parameters on the InsertParameters collection of the underlying datasource.
 
Back
Top Bottom