Can a typed DataSet be made in code so that code that comes after the type
code will pick up on the dataset's table structure for intellisense?

RE: Typed DataSet in code... by v-kevy

v-kevy
Tue Jun 01 20:28:25 CDT 2004

Hi Scott,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to use intellisense on a typed
DataSet when it is made in code. If there is any misunderstanding, please
feel free to let me know.

As far as I know, typed DataSets are made in code. When you have created
your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
automatically according to the schema files using xsd.exe. The generated
file will be put together with the schema. To see the .cs or .vb file that
has been generated, here are the steps:

1. Click on the button Show all files in the Solution Explorer.
2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the Solution
Explorer.
3. Double click MyDataSet.cs or MyDataSet.vb to see the typed DataSet class
definition.

After you have built the project, the typed DataSet structure can be used
for intellisense. For example, if you have two tables in it, named
Customers and Orders, when you need to get the reference for one of the
tables, you can simple use myDataSet.Orders instead of
myDataSet.Tables["Orders"].

HTH. If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Re: Typed DataSet in code... by Scott

Scott
Tue Jun 01 20:37:29 CDT 2004

Actually Kevin, my question is, can you make a typed dataset completely from
handwritten code, not using the IDE?

"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> Hi Scott,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you need to use intellisense on a
typed
> DataSet when it is made in code. If there is any misunderstanding, please
> feel free to let me know.
>
> As far as I know, typed DataSets are made in code. When you have created
> your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
> automatically according to the schema files using xsd.exe. The generated
> file will be put together with the schema. To see the .cs or .vb file
that
> has been generated, here are the steps:
>
> 1. Click on the button Show all files in the Solution Explorer.
> 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
Solution
> Explorer.
> 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed DataSet
class
> definition.
>
> After you have built the project, the typed DataSet structure can be used
> for intellisense. For example, if you have two tables in it, named
> Customers and Orders, when you need to get the reference for one of the
> tables, you can simple use myDataSet.Orders instead of
> myDataSet.Tables["Orders"].
>
> HTH. If anything is unclear, please feel free to reply to the post.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>



Re: Typed DataSet in code... by William

William
Tue Jun 01 21:54:47 CDT 2004

Only if you run xsd.exe against it. You can't do it dynamically at runtime
. Well technically you can Process.Start(xsd.exe) but that won't get you
anything without a LOT of other work that is totally not worth it.

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
"Scott M." <s-mar@nospam.nospam> wrote in message
news:O$7edIESEHA.2876@TK2MSFTNGP09.phx.gbl...
> Actually Kevin, my question is, can you make a typed dataset completely
from
> handwritten code, not using the IDE?
>
> "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> > Hi Scott,
> >
> > First of all, I would like to confirm my understanding of your issue.
From
> > your description, I understand that you need to use intellisense on a
> typed
> > DataSet when it is made in code. If there is any misunderstanding,
please
> > feel free to let me know.
> >
> > As far as I know, typed DataSets are made in code. When you have created
> > your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
> > automatically according to the schema files using xsd.exe. The generated
> > file will be put together with the schema. To see the .cs or .vb file
> that
> > has been generated, here are the steps:
> >
> > 1. Click on the button Show all files in the Solution Explorer.
> > 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
> Solution
> > Explorer.
> > 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed DataSet
> class
> > definition.
> >
> > After you have built the project, the typed DataSet structure can be
used
> > for intellisense. For example, if you have two tables in it, named
> > Customers and Orders, when you need to get the reference for one of the
> > tables, you can simple use myDataSet.Orders instead of
> > myDataSet.Tables["Orders"].
> >
> > HTH. If anything is unclear, please feel free to reply to the post.
> >
> > Kevin Yu
> > =======
> > "This posting is provided "AS IS" with no warranties, and confers no
> > rights."
> >
>
>



Re: Typed DataSet in code... by Miha

Miha
Wed Jun 02 02:34:55 CDT 2004

Hi Scott,

Why not?
Look the .cs class behind the xsd file -there is everything
MSDataSetGenerator created.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Scott M." <s-mar@nospam.nospam> wrote in message
news:O$7edIESEHA.2876@TK2MSFTNGP09.phx.gbl...
> Actually Kevin, my question is, can you make a typed dataset completely
from
> handwritten code, not using the IDE?
>
> "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> > Hi Scott,
> >
> > First of all, I would like to confirm my understanding of your issue.
From
> > your description, I understand that you need to use intellisense on a
> typed
> > DataSet when it is made in code. If there is any misunderstanding,
please
> > feel free to let me know.
> >
> > As far as I know, typed DataSets are made in code. When you have created
> > your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
> > automatically according to the schema files using xsd.exe. The generated
> > file will be put together with the schema. To see the .cs or .vb file
> that
> > has been generated, here are the steps:
> >
> > 1. Click on the button Show all files in the Solution Explorer.
> > 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
> Solution
> > Explorer.
> > 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed DataSet
> class
> > definition.
> >
> > After you have built the project, the typed DataSet structure can be
used
> > for intellisense. For example, if you have two tables in it, named
> > Customers and Orders, when you need to get the reference for one of the
> > tables, you can simple use myDataSet.Orders instead of
> > myDataSet.Tables["Orders"].
> >
> > HTH. If anything is unclear, please feel free to reply to the post.
> >
> > Kevin Yu
> > =======
> > "This posting is provided "AS IS" with no warranties, and confers no
> > rights."
> >
>
>



Re: Typed DataSet in code... by Scott

Scott
Wed Jun 02 07:07:33 CDT 2004

I'm not asking if a typed DataSet can be represented by code. I'm asking if
I can make one completely in code (no VS .NET drag & drop) and still get
intellisense when I use the DataSet.


"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:eRAoaQHSEHA.1644@TK2MSFTNGP09.phx.gbl...
> Hi Scott,
>
> Why not?
> Look the .cs class behind the xsd file -there is everything
> MSDataSetGenerator created.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
>
> "Scott M." <s-mar@nospam.nospam> wrote in message
> news:O$7edIESEHA.2876@TK2MSFTNGP09.phx.gbl...
> > Actually Kevin, my question is, can you make a typed dataset completely
> from
> > handwritten code, not using the IDE?
> >
> > "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> > news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> > > Hi Scott,
> > >
> > > First of all, I would like to confirm my understanding of your issue.
> From
> > > your description, I understand that you need to use intellisense on a
> > typed
> > > DataSet when it is made in code. If there is any misunderstanding,
> please
> > > feel free to let me know.
> > >
> > > As far as I know, typed DataSets are made in code. When you have
created
> > > your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
> > > automatically according to the schema files using xsd.exe. The
generated
> > > file will be put together with the schema. To see the .cs or .vb file
> > that
> > > has been generated, here are the steps:
> > >
> > > 1. Click on the button Show all files in the Solution Explorer.
> > > 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
> > Solution
> > > Explorer.
> > > 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed DataSet
> > class
> > > definition.
> > >
> > > After you have built the project, the typed DataSet structure can be
> used
> > > for intellisense. For example, if you have two tables in it, named
> > > Customers and Orders, when you need to get the reference for one of
the
> > > tables, you can simple use myDataSet.Orders instead of
> > > myDataSet.Tables["Orders"].
> > >
> > > HTH. If anything is unclear, please feel free to reply to the post.
> > >
> > > Kevin Yu
> > > =======
> > > "This posting is provided "AS IS" with no warranties, and confers no
> > > rights."
> > >
> >
> >
>
>



Re: Typed DataSet in code... by Miha

Miha
Wed Jun 02 07:38:48 CDT 2004

Hi Scott,

I am not sure I understand you.
Typed dataset is code, acutally it is a class derived from DataSet.
The designer does just that - it converts xsd into a class derived from
DataSet which is later used by ide.
You can freely create it by yourself - it is no magic there.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

So, if you code your own typed dataset
"Scott M." <s-mar@nospam.nospam> wrote in message
news:%23gjDioJSEHA.3056@TK2MSFTNGP11.phx.gbl...
> I'm not asking if a typed DataSet can be represented by code. I'm asking
if
> I can make one completely in code (no VS .NET drag & drop) and still get
> intellisense when I use the DataSet.
>
>
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:eRAoaQHSEHA.1644@TK2MSFTNGP09.phx.gbl...
> > Hi Scott,
> >
> > Why not?
> > Look the .cs class behind the xsd file -there is everything
> > MSDataSetGenerator created.
> >
> > --
> > Miha Markic [MVP C#] - RightHand .NET consulting & development
> > miha at rthand com
> > www.rthand.com
> >
> > "Scott M." <s-mar@nospam.nospam> wrote in message
> > news:O$7edIESEHA.2876@TK2MSFTNGP09.phx.gbl...
> > > Actually Kevin, my question is, can you make a typed dataset
completely
> > from
> > > handwritten code, not using the IDE?
> > >
> > > "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> > > news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> > > > Hi Scott,
> > > >
> > > > First of all, I would like to confirm my understanding of your
issue.
> > From
> > > > your description, I understand that you need to use intellisense on
a
> > > typed
> > > > DataSet when it is made in code. If there is any misunderstanding,
> > please
> > > > feel free to let me know.
> > > >
> > > > As far as I know, typed DataSets are made in code. When you have
> created
> > > > your .XSD file in IDE, VS.NET will generate class (.cs or .vb) file
> > > > automatically according to the schema files using xsd.exe. The
> generated
> > > > file will be put together with the schema. To see the .cs or .vb
file
> > > that
> > > > has been generated, here are the steps:
> > > >
> > > > 1. Click on the button Show all files in the Solution Explorer.
> > > > 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
> > > Solution
> > > > Explorer.
> > > > 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed
DataSet
> > > class
> > > > definition.
> > > >
> > > > After you have built the project, the typed DataSet structure can be
> > used
> > > > for intellisense. For example, if you have two tables in it, named
> > > > Customers and Orders, when you need to get the reference for one of
> the
> > > > tables, you can simple use myDataSet.Orders instead of
> > > > myDataSet.Tables["Orders"].
> > > >
> > > > HTH. If anything is unclear, please feel free to reply to the post.
> > > >
> > > > Kevin Yu
> > > > =======
> > > > "This posting is provided "AS IS" with no warranties, and confers no
> > > > rights."
> > > >
> > >
> > >
> >
> >
>
>



Re: Typed DataSet in code... by Scott

Scott
Wed Jun 02 07:56:11 CDT 2004

Again Miha, I understand that the RESULT of the designer is code that I
could have written myself. But the designer also creates an XSD file, which
is the basis for the intellisense that you get when coding against the
dataset in other spots in the code. My question was can I get the
intelliSense of a typed DataSet, when making a dataset by hand (not with the
designer), and thus, without an xsd file.


"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%23ztaO6JSEHA.1312@TK2MSFTNGP12.phx.gbl...
> Hi Scott,
>
> I am not sure I understand you.
> Typed dataset is code, acutally it is a class derived from DataSet.
> The designer does just that - it converts xsd into a class derived from
> DataSet which is later used by ide.
> You can freely create it by yourself - it is no magic there.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
>
> So, if you code your own typed dataset
> "Scott M." <s-mar@nospam.nospam> wrote in message
> news:%23gjDioJSEHA.3056@TK2MSFTNGP11.phx.gbl...
> > I'm not asking if a typed DataSet can be represented by code. I'm asking
> if
> > I can make one completely in code (no VS .NET drag & drop) and still get
> > intellisense when I use the DataSet.
> >
> >
> > "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> > news:eRAoaQHSEHA.1644@TK2MSFTNGP09.phx.gbl...
> > > Hi Scott,
> > >
> > > Why not?
> > > Look the .cs class behind the xsd file -there is everything
> > > MSDataSetGenerator created.
> > >
> > > --
> > > Miha Markic [MVP C#] - RightHand .NET consulting & development
> > > miha at rthand com
> > > www.rthand.com
> > >
> > > "Scott M." <s-mar@nospam.nospam> wrote in message
> > > news:O$7edIESEHA.2876@TK2MSFTNGP09.phx.gbl...
> > > > Actually Kevin, my question is, can you make a typed dataset
> completely
> > > from
> > > > handwritten code, not using the IDE?
> > > >
> > > > "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> > > > news:p8xszDESEHA.1516@cpmsftngxa10.phx.gbl...
> > > > > Hi Scott,
> > > > >
> > > > > First of all, I would like to confirm my understanding of your
> issue.
> > > From
> > > > > your description, I understand that you need to use intellisense
on
> a
> > > > typed
> > > > > DataSet when it is made in code. If there is any misunderstanding,
> > > please
> > > > > feel free to let me know.
> > > > >
> > > > > As far as I know, typed DataSets are made in code. When you have
> > created
> > > > > your .XSD file in IDE, VS.NET will generate class (.cs or .vb)
file
> > > > > automatically according to the schema files using xsd.exe. The
> > generated
> > > > > file will be put together with the schema. To see the .cs or .vb
> file
> > > > that
> > > > > has been generated, here are the steps:
> > > > >
> > > > > 1. Click on the button Show all files in the Solution Explorer.
> > > > > 2. If your typed DataSet is MyDataSet, expand MyDataSet.xsd in the
> > > > Solution
> > > > > Explorer.
> > > > > 3. Double click MyDataSet.cs or MyDataSet.vb to see the typed
> DataSet
> > > > class
> > > > > definition.
> > > > >
> > > > > After you have built the project, the typed DataSet structure can
be
> > > used
> > > > > for intellisense. For example, if you have two tables in it, named
> > > > > Customers and Orders, when you need to get the reference for one
of
> > the
> > > > > tables, you can simple use myDataSet.Orders instead of
> > > > > myDataSet.Tables["Orders"].
> > > > >
> > > > > HTH. If anything is unclear, please feel free to reply to the
post.
> > > > >
> > > > > Kevin Yu
> > > > > =======
> > > > > "This posting is provided "AS IS" with no warranties, and confers
no
> > > > > rights."
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Typed DataSet in code... by v-kevy

v-kevy
Thu Jun 03 04:17:10 CDT 2004

Hi Scott,

I think you can feel free to create a DataSet by hand and get intellisense,
since the .xsd file is used for generating the .cs file for class. Just
derive from DataSet class to do it.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."