Home All Groups Group Topic Archive Search About
Author
3 Mar 2006 11:48 AM
Max André Bündchen
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? :-)

Author
3 Mar 2006 12:23 PM
Patrice
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
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
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? :-)
>
>
Author
3 Mar 2006 12:24 PM
Miha Markic [MVP C#]
Hi Max,

You can do whatever you want with typed or untyped dataset and PKs.
What is your problem?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"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? :-)
>
Author
3 Mar 2006 2:01 PM
Kerry Moorman
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? :-)
>
>
>

AddThis Social Bookmark Button