473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

Hi

I have the following table (*=Primary Key):
tblNews:
fldID (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

Nov 17 '05 #1
3 1839
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/

<pa***********@MXL.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi

I have the following table (*=Primary Key):
tblNews:
fldID (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

Nov 17 '05 #2
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 [MVP C#]" wrote:
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/

<pa***********@MXL.com> wrote in message
news:11**********************@z14g2000cwz.googleg roups.com...
Hi

I have the following table (*=Primary Key):
tblNews:
fldID (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



--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #3

"Paul" <pa***********@MXL.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
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 [MVP C#]" wrote:
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/

<pa***********@MXL.com> wrote in message
news:11**********************@z14g2000cwz.google groups.com...
Hi

I have the following table (*=Primary Key):
tblNews:
fldID (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



--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: dterrors | last post by:
Will php 6 do strong typing and/or namespaces? I was shocked to find out today that there are some people who actually argue that weak typing is somehow better. I didn't even know there was a...
0
by: Nathan Ernst | last post by:
I have a pretty simple XSD schema: ******************************************** * XSD SCHEMA ******************************************** <?xml version="1.0" encoding="utf-8" ?> <xs:schema...
3
by: Chris Thunell | last post by:
I have 2 forms, on 1 form i use the wizards to create a strong typed dataset with tables from an SQL database... and from that i can do stuff like: me.daEmployee.fill(me.dataset11.tblEmployee) ...
3
by: Steve Amey | last post by:
Hi all I have created a strong DataSet using Visual Studio. I have been in to the DataSet's vb file to have a look at the code and see if I can add things to it. What I'm after is to create a...
3
by: Freeon | last post by:
Hi, I am looking for a way to sort a strong typed dataset. It would seem the most straightforward way is to use a dataview. The only problem is when I use the dataview I seem to loose the strong...
1
by: JoshKaos | last post by:
I am in the process of rewriting a WebService. The WebMethods are all returning XMLDocuments. First, they get a Dataset of records and then walk through the Dataset to populate the XMLDocument...
1
by: Steve | last post by:
I have a windows CE application, talking to a C# WebService. In the WebService project I have created a dataset (dsJobList), and there is a web method in there which returns a fully loaded...
0
by: =?Utf-8?B?T2xkbWFu?= | last post by:
I currently have a method with the following declaration: public NGApiStatus CreateItems ( NGItems items, string strBatchName, bool bCreateBatch, bool bFailifBatchExists, string...
1
by: fsx | last post by:
I have a class that accepts objects via an add method and then stores them in a list of objects: public class tagBuilder private _store as Dictionary(Of String, Object) public sub...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.