Hello:

I'm creating an ASP.Net application. I need to run a method that would
return a DataSet. I'm new to C#, so I have a problem with it.

In VB.Net I just used to write a function like this:

Public Function GetOrders(ByVal sSQL As String) As DataSet

In C# when I try to write something like this:

public DataSet CreateDataset(string sSQL)
{
}

I get an error:
"D:\C#_Projects\connect_class\connect_class\clConnect.cs(16): The type or
namespace name 'DataSet' could not be found (are you missing a using
directive or an assembly reference?)"

How would I do this?

Thank you very much in advance,
--
Peter Afonin

Re: How to return DataSet by Alvin

Alvin
Mon Nov 10 20:51:19 CST 2003

you need the system.data namespace in your using section at the top of the
file

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Peter Afonin" <pafo@specialtypulltabs.com> wrote in message
news:uSOCCy#pDHA.2012@TK2MSFTNGP12.phx.gbl...
> Hello:
>
> I'm creating an ASP.Net application. I need to run a method that would
> return a DataSet. I'm new to C#, so I have a problem with it.
>
> In VB.Net I just used to write a function like this:
>
> Public Function GetOrders(ByVal sSQL As String) As DataSet
>
> In C# when I try to write something like this:
>
> public DataSet CreateDataset(string sSQL)
> {
> }
>
> I get an error:
> "D:\C#_Projects\connect_class\connect_class\clConnect.cs(16): The type or
> namespace name 'DataSet' could not be found (are you missing a using
> directive or an assembly reference?)"
>
> How would I do this?
>
> Thank you very much in advance,
> --
> Peter Afonin
>
>



Re: How to return DataSet by Peter

Peter
Mon Nov 10 23:48:00 CST 2003

Thank you, Alvin.

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com> wrote in
message news:OrV9w6$pDHA.2488@TK2MSFTNGP12.phx.gbl...
> you need the system.data namespace in your using section at the top of the
> file
>
> --
>
>
> -----------
> Got TidBits?
> Get it here: www.networkip.net/tidbits
> "Peter Afonin" <pafo@specialtypulltabs.com> wrote in message
> news:uSOCCy#pDHA.2012@TK2MSFTNGP12.phx.gbl...
> > Hello:
> >
> > I'm creating an ASP.Net application. I need to run a method that would
> > return a DataSet. I'm new to C#, so I have a problem with it.
> >
> > In VB.Net I just used to write a function like this:
> >
> > Public Function GetOrders(ByVal sSQL As String) As DataSet
> >
> > In C# when I try to write something like this:
> >
> > public DataSet CreateDataset(string sSQL)
> > {
> > }
> >
> > I get an error:
> > "D:\C#_Projects\connect_class\connect_class\clConnect.cs(16): The type
or
> > namespace name 'DataSet' could not be found (are you missing a using
> > directive or an assembly reference?)"
> >
> > How would I do this?
> >
> > Thank you very much in advance,
> > --
> > Peter Afonin
> >
> >
>
>