G
Guest
Hi Everyone,
I'm currently using VS 2005 and would like to use the databinding of the
controls to help ease up some of the coding I have to do (some of my forms
have over 120 fields). The problem I find is that in the database we are
currently creating the primary key within the stored procedure like so:
Declare @LastValue int
Set @LastValue = (Select ScreeningId from Support)
set @LastValue = @LastValue + 1
Update Support
Set ScreeningId = @LastValue
/THe insert code would follow using LastValue as the primary key/
I found I had problems with inserting new records when I used databound
controls. It would through errors about invalid use as null for the primary
key. I was wondering if anyone else has run across this and how they solved
this problem, or if you found a better solution. The form I'm currently
working on has little over 150 fields and it has taken a while to code each
field for the Insert, Update and setting the data for the field. I hope
someone would have any suggestions. Thanks.
Michael
I'm currently using VS 2005 and would like to use the databinding of the
controls to help ease up some of the coding I have to do (some of my forms
have over 120 fields). The problem I find is that in the database we are
currently creating the primary key within the stored procedure like so:
Declare @LastValue int
Set @LastValue = (Select ScreeningId from Support)
set @LastValue = @LastValue + 1
Update Support
Set ScreeningId = @LastValue
/THe insert code would follow using LastValue as the primary key/
I found I had problems with inserting new records when I used databound
controls. It would through errors about invalid use as null for the primary
key. I was wondering if anyone else has run across this and how they solved
this problem, or if you found a better solution. The form I'm currently
working on has little over 150 fields and it has taken a while to code each
field for the Insert, Update and setting the data for the field. I hope
someone would have any suggestions. Thanks.
Michael