Primary Key/Uniqueness in automatically generated datatable.

jrhbright

New member
Joined
Sep 22, 2010
Messages
3
Programming Experience
Beginner
I'm making a windows forms vb.net application which connects to a mssql database. The database has several stored procedures.
I have connected to the database including all tables and stored procedures using the visual studio wizard which has created me a really good dataset - With one exception.

In one of the automatically created tables it has made to hold the results of a stored procedure it has chosen an (arbitrary?) column to use as the table's primary key which I would like to change because it is throwing exceptions during run-time.
Using the visual studio gui to edit the dataset I have found the 'unique' property of the datacolumns in my automatically generated datatable, but can't seem to change them.

I would like either no unique properties at all (although I can understand why they wouldn't let you do this). Or I'd like the uniqueness to be over two datacolumns (which is what it is in the database)

Thanks for your help.
Joe
 
The datatable depiction in the dataset will have key symbols next to the rows. Right click the datatable and choose Keys.. from the popup menu to alter them
 
Back
Top