Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 One-To-Many into a DataSet??

Author  Topic 

dirkdiggler
Starting Member

24 Posts

Posted - 2006-09-25 : 06:28:06
Hi There,

Sorry if this is in the wrong forum, but I am a little stuck.

I have a article DB.

One article can have more than one Author.

So I added a link table I now have three tables.

Article
Article_Author
Author

If a article has two Authors my Stored procedure brings back two rows(one for each author)

The problem is, when I try using this to fill a Ado.Net dataset I get a violation of my primary key because there are two rows with the same key.

Does anyone know how I can get around this?

Thanks in advance.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-25 : 09:18:48
Can you give more information on what you are trying to do?
Post some sample data and the result you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-09-25 : 09:20:11
What are you defining as the PK? It needs to be Article, Author (in either order).

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -