C# .Net V2, Strong Type Dataset returning more than one row.

P

paul.phillips

Hi

I have the following table (*=Primary Key):
tblfldID (Indentity)
fldSite int *
fldPageID int *
fldSection int *
fldContent

I am using a Dataset (Strong typed, generated via the IDE wizard), I
can get to return only one row but I would like to return more, for
example, I want to return all rows that match "fldSiteID=1", it comes
up with an error saying that it does not meet the constrains of the
dataset/table.

Please help
 
P

Paul

No, the wizard has created a strong typed dataset for me (I am using
VS.NET 2005), via the GUI it only allows me to only return one signle
row, regardless if I use SQL, Stored proc etc.

I can get around this problem by not using a Strong Type Dataset but
this means that I have to guess what fields that I am using etc.



Miha Markic said:
Are you using DataTable.Select() method?

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

Hi

I have the following table (*=Primary Key):
tblfldID (Indentity)
fldSite int *
fldPageID int *
fldSection int *
fldContent

I am using a Dataset (Strong typed, generated via the IDE wizard), I
can get to return only one row but I would like to return more, for
example, I want to return all rows that match "fldSiteID=1", it comes
up with an error saying that it does not meet the constrains of the
dataset/table.

Please help
 
M

Miha Markic [MVP C#]

Paul said:
No, the wizard has created a strong typed dataset for me (I am using
VS.NET 2005), via the GUI it only allows me to only return one signle
row, regardless if I use SQL, Stored proc etc.

Are you speaking about database retrival?
I am not sure what do you mean by that. Does it return only one row from
database?

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

I can get around this problem by not using a Strong Type Dataset but
this means that I have to guess what fields that I am using etc.



Miha Markic said:
Are you using DataTable.Select() method?

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

Hi

I have the following table (*=Primary Key):
tblfldID (Indentity)
fldSite int *
fldPageID int *
fldSection int *
fldContent

I am using a Dataset (Strong typed, generated via the IDE wizard), I
can get to return only one row but I would like to return more, for
example, I want to return all rows that match "fldSiteID=1", it comes
up with an error saying that it does not meet the constrains of the
dataset/table.

Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top