Click here to Skip to main content
11,933,854 members (36,269 online)
Rate this:
Please Sign up or sign in to vote.
See more: .NET3.5 .NET
Helloo ,

Can anyone help me i got this issue ,how solve this
Posted 5-Feb-13 2:09am
gagan sawaliya 5-Feb-13 7:13am
post some code
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

If you need to return a DataSet, and all you have is a DataTable, you can add the DataTable to a dummy DataSet and return that. Here's an example:
public DataSet DoSomething()
  DataTable people = GetPeopleWhoMatchSomeCriteria();
  DataSet dummySet = new DataSet();
  return dummySet;
The alternative is to change the return type from DataSet to DataTable.
thatraja 5-Feb-13 13:59pm

Hi Pete!
Pete O'Hanlon 5-Feb-13 14:08pm
How do mate? How are you doing?
thatraja 5-Feb-13 14:29pm
I'm OK, It's been long time, hope you're doing great. I come back here today....(I was inactive here)
Pete O'Hanlon 5-Feb-13 14:51pm
I'm fine thanks. Busy busy. Hope you're keeping well.
Answered without repeating what the compiler already told to him :-), a 5.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can't cast a DataTable to DataSet.
Pete O'Hanlon 5-Feb-13 7:43am
That doesn't really help solve the issue though, does it? You're just telling him what the compiler already told him.
sarahnimy 5-Feb-13 23:12pm
actually, im completely new to my knowledge is limited....but thanks anyway for your solution.
No one told me the alternate method

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100