|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Primary KeyI'm dev. a app with typed datasets and I would not use a self-inc field for the primary key. Instead of I would like make my own pk
control. What's the best way to make that with VS 2005 + SQL 2005? Just make a sp like the old good times? :-) Not sure what the problem is. Just define the pk to be on the field(s) you
want and provide those fields with a new value when inserting... What have you tried that doesn't work ? -- Patrice "Max André Bündchen" <nospam@microsoft.com> a écrit dans le message de for the primary key. Instead of I would like make my own pknews:e5kF8grPGHA.5784@TK2MSFTNGP10.phx.gbl... > I'm dev. a app with typed datasets and I would not use a self-inc field Show quote > control. What's the best way to make that with VS 2005 + SQL 2005? > > Just make a sp like the old good times? :-) > > Hi Max,
You can do whatever you want with typed or untyped dataset and PKs. What is your problem? -- Show quoteMiha Markic [MVP C#] RightHand .NET consulting & development www.rthand.com Blog: http://cs.rthand.com/blogs/blog_with_righthand/ "Max André Bündchen" <nospam@microsoft.com> wrote in message news:e5kF8grPGHA.5784@TK2MSFTNGP10.phx.gbl... > I'm dev. a app with typed datasets and I would not use a self-inc field > for the primary key. Instead of I would like make my own pk control. > What's the best way to make that with VS 2005 + SQL 2005? > > Just make a sp like the old good times? :-) > Max,
If you mean that you want to generate a primary key value for a new row, but you don't want to let the database use an identity or autonumber column then you could use .Net's GUID class. Be sure to think about the downsides of doing this. Kerry Moorman Show quote "Max André Bündchen" wrote: > I'm dev. a app with typed datasets and I would not use a self-inc field for the primary key. Instead of I would like make my own pk > control. What's the best way to make that with VS 2005 + SQL 2005? > > Just make a sp like the old good times? :-) > > > |
|||||||||||||||||||||||