473,385 Members | 1,712 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,385 software developers and data experts.

DataSets and cs files

Is there a way to get the .NET framework to generate a cs file
associated with a schema other than when the DataSet is modified?

Since the cs file is automatically generated based on the schema,
there is a discussion going on at work regarding whether this file
should be placed under source control, or generated each time the
projects are built.

The issue is, we don't know if it's even possible to generate the cs
file at build time versus editing the DataSet.
Thanks (hope I'm clear).
Rob
Nov 22 '05 #1
4 1481
Rob Brown <ro********@comcast.net> wrote:
Is there a way to get the .NET framework to generate a cs file
associated with a schema other than when the DataSet is modified?

Since the cs file is automatically generated based on the schema,
there is a discussion going on at work regarding whether this file
should be placed under source control, or generated each time the
projects are built.

The issue is, we don't know if it's even possible to generate the cs
file at build time versus editing the DataSet.


You can generate it automatically with the xsd utility.

For instance:

xsd /d /l:C# foo.xsd

will generate a dataset based on foo.xsd. Run just xsd.exe to get more
options.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
Hi Rob,

I am using the default settings (cs file stored in source safe) and didn't
have any problems so far.
Is there a problem you have?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Rob Brown" <ro********@comcast.net> wrote in message
news:7c**************************@posting.google.c om...
Is there a way to get the .NET framework to generate a cs file
associated with a schema other than when the DataSet is modified?

Since the cs file is automatically generated based on the schema,
there is a discussion going on at work regarding whether this file
should be placed under source control, or generated each time the
projects are built.

The issue is, we don't know if it's even possible to generate the cs
file at build time versus editing the DataSet.
Thanks (hope I'm clear).
Rob

Nov 22 '05 #3
Hi Miha, Jon

Thanks for the response and tip.

There is no problem, per say. We were not sure if we should put the
generated cs file under source control. But we noticed the .NET
studio does not auto-generate the cs file when the project is grabbed
from source control onto a new system.

Placing the cs file under source control creates a problem if somebody
edits the DataSet without checking out the associated cs file. A new
cs file is created with a different filename, quietly.

We knew we could use the xsd utility, however, for every new dataset,
we have to do some (albeit, limited) editing to run it. It would be
nice if we were able to build the project without going through hoops
and hurdles.

We were hoping there is some project config setting that we couldn't
find along the lines of "Always Generate Dataset At Build Time".

Sounds like we need to use the xsd to generate these files.

Thanks again for the tip.
Rob

"Miha Markic" <miha at rthand com> wrote in message news:<e3**************@TK2MSFTNGP09.phx.gbl>...
Hi Rob,

I am using the default settings (cs file stored in source safe) and didn't
have any problems so far.
Is there a problem you have?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Rob Brown" <ro********@comcast.net> wrote in message
news:7c**************************@posting.google.c om...
Is there a way to get the .NET framework to generate a cs file
associated with a schema other than when the DataSet is modified?

Since the cs file is automatically generated based on the schema,
there is a discussion going on at work regarding whether this file
should be placed under source control, or generated each time the
projects are built.

The issue is, we don't know if it's even possible to generate the cs
file at build time versus editing the DataSet.
Thanks (hope I'm clear).
Rob

Nov 22 '05 #4
Hi Rob,

"Rob Brown" <ro********@comcast.net> wrote in message
news:7c**************************@posting.google.c om...
Hi Miha, Jon

Thanks for the response and tip.

There is no problem, per say. We were not sure if we should put the
generated cs file under source control. But we noticed the .NET
studio does not auto-generate the cs file when the project is grabbed
from source control onto a new system.

Placing the cs file under source control creates a problem if somebody
edits the DataSet without checking out the associated cs file. A new
cs file is created with a different filename, quietly.

We knew we could use the xsd utility, however, for every new dataset,
we have to do some (albeit, limited) editing to run it. It would be
nice if we were able to build the project without going through hoops
and hurdles.

We were hoping there is some project config setting that we couldn't
find along the lines of "Always Generate Dataset At Build Time". Sounds like we need to use the xsd to generate these files.


I don't know if you know :) but if you right click on xsd file in solution
explorer the popup menu gives you an option Run Custom Tool which does the
same.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com
Nov 22 '05 #5

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

Similar topics

1
by: Sylesh Nair | last post by:
How can I compare the values in two different datasets ? If I transform the datasets into two different XML files ... Can I do the same ? I find problem .. cos the Nodes for both the XML files...
7
by: Tim Smith | last post by:
Hi, Is it possible to create a progam to mimic the following action a) drag oledbadapter to form1.cs b) select my oracle ole connection c) enter 'select * from mytable' d) create adapter for...
4
by: Alpha | last post by:
I have a small Window application and through out the different forms I create a different dataset. At the begining I used the Tools to drag and drop the SqlDataAdapter, connection and dataset...
0
by: Sanjay | last post by:
I have a question whose answer will help me save a lot of time in investigation and implementation. Becuase we have a mix of platforms (Windows/Unix etc) in our environment I would like to...
9
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.