473,405 Members | 2,338 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,405 software developers and data experts.

Sending typed DataTable results in error

Hi all,

Situation:
----------
1) I have a typed dataset (generated with the supplied VS tools)
containing several tables (some of which quite large).
2) I have a webservices that needs to expose each tabel individually
3) Exposing the dataset as a whole is not a problem
4) A singleton is used to establish an update queue so users dont get in
eachothers; I don't think this is of any consequence here.
Problem:
--------
In point 2 I try to run the following code (which fails immediately when
running the service, compiling is not a problem)

//snippet

[WebMethod]
public dsPS.tbl_ArticlesDataTable GetArticles(int UserID, int TableIndex,
DateTime LastUpdate)
{
Synchro SyncLock = Synchro.Instance;
if(SyncLock.RefreshLock(UserID)==0)
{
dsPS.tbl_ArticlesDataTable Articles = new dsPS.tbl_ArticlesDataTable();
daArticles2.Fill(Articles);
Articles=(dsPS.tbl_ArticlesDataTable)RemoveOldData (Articles,TableIndex,LastUpdate);
return Articles;
}
return null;
}

//end snippet

This results in the following error

//error

You must implement the Add(System.Object) method on
JNS_Service.dsPS+tbl_ArticlesDataTable because it inherits from
IEnumerable.

//end error
Question:
---------
How do I fix this?
The following I have already tried:
1) Making the tbl_ArticlesDataTable class explicitly serializable in the
generated dataset class
=> Same error
2) Changing output to an untyped dataset
=> Different (vague) error

I have already found many answers/solutions to this particulair error
message but most just explain the cause of the problem withour a
work-around (does me little good) and others describe work-around that
don't seem to apply to my particulair situation.
Thank you for any help,
Cyr1dian
Nov 29 '05 #1
0 927

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

Similar topics

1
by: Somebody_Out_There | last post by:
Hello, I am trying to create a strongly typed datatable/dataset from an untyped dataset or datatable returned from a stored proc. The structure of the table cannot be static since the results...
0
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two...
3
by: Rakesh Rajan | last post by:
Hi, I have a method, which opens a connection, creates an untyped datable, fills it and returns it back. I have defined a typed datatable in my application as well. For some reasons, I have to...
1
by: Ersin Gençtürk | last post by:
I have 2 typed data tables inherited from the same dataset schema One called : table A with an identity column x column x is constrained to be unique. Other one is : table B with an identity...
9
by: Steven C. | last post by:
Hello: I'm getting an error, "primary key not defined" when trying to use the FIND method on the DataTable Rows collection. I have a typed dataset called 'MortgagesDS' that I created with the...
0
by: Liming | last post by:
Hi, I designed a few DataSet Tables in the typed dataset dsigner. Recently, I encountered an error saying Failed to enable constraints. One or more rows contain values violating non-null,...
4
by: Joseph Geretz | last post by:
I don't get it. A DataTable can't be returned, but a DataSet can. Yet a DataSet contains one or more DataTables. So obviously a DataTable must be serializable. So why not just let me return a...
21
by: Peter Bradley | last post by:
Hi all, This post is sort of tangentially related to my earlier posts on configuration files for DLLs. Does anyone know how to create typed DataSets using VS2005's new DataSet designer, but...
2
by: J055 | last post by:
Hi I need to search a number of DataTables within a DataSet (with some relationships) and then display the filtered results in a GridView. The Columns that need to be displayed come from 2 of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.