Click here to Skip to main content
11,805,604 members (47,758 online)
Rate this: bad
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 1:09am
gagan sawaliya at 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 at 5-Feb-13 13:59pm

Hi Pete!
Pete O'Hanlon at 5-Feb-13 14:08pm
How do mate? How are you doing?
thatraja at 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 at 5-Feb-13 14:51pm
I'm fine thanks. Busy busy. Hope you're keeping well.
Sergey Alexandrovich Kryukov at 5-Feb-13 23:53pm
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 at 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 at 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
0 OriginalGriff 300
1 Richard Deeming 225
2 Sergey Alexandrovich Kryukov 170
3 ppolymorphe 125
4 CPallini 120
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web03 | 2.8.151002.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