Primary Key

  • Thread starter Thread starter Max André Bündchen
  • Start date Start date
M

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? :-)
 
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 said:
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
 
Hi Max,

You can do whatever you want with typed or untyped dataset and PKs.
What is your problem?
 
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
 
Back
Top