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

XML Dataset Code Gen Internal Constructors

Hey All,

I have written a tool that generates XML for a dataset.
You know when you add a dataset file to a project, you write the XML
and the code gets generated automatically? Well I want this sitting in
a seperate DLL project.
However, the code generated by VS specifies a constructor that is
INTERNAL.

Is it possible to either tell VS that the generated code should have
public constructors, or perhaps to specify somewhere in the XML to tell

it to make them public?

I don't want move the dataset into the main project if i don't have to.

Essentially it prevents the dataset from being reusable across
projects. This is bad for me.

Any help is greatly appreciated.

Cheers,
Steven

Mar 19 '06 #1
2 1746
Steven,
I don't know exactly what your business logic scenario is, but you could try
using XSD.EXE to generate the dataset which would give you the source code
that you can easily modify. Also, there is a tool called XSDObjectGen and a
similar tool from MVP Daniel Cazzulino et al (which name I've forgotten) that
will do the same but offer even more customizations. Finally there is an
open -source tool on Sourceforge.net called "dingo" that is even one step
more sophisticated.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Steven Nagy" wrote:
Hey All,

I have written a tool that generates XML for a dataset.
You know when you add a dataset file to a project, you write the XML
and the code gets generated automatically? Well I want this sitting in
a seperate DLL project.
However, the code generated by VS specifies a constructor that is
INTERNAL.

Is it possible to either tell VS that the generated code should have
public constructors, or perhaps to specify somewhere in the XML to tell

it to make them public?

I don't want move the dataset into the main project if i don't have to.

Essentially it prevents the dataset from being reusable across
projects. This is bad for me.

Any help is greatly appreciated.

Cheers,
Steven

Mar 20 '06 #2
Thanks for the reply Peter.

I know that I can customise the code that is generated from XSD.EXE but
the problem is that in half a day I might regenerate the code again,
which means those constructor changes are lost.
So I am wondering if there is a way to specify in the XML (XSD) view,
the constructor accessor. Changing the constructors for 50+ classes
everytime.

The third party tools are an option but because I don't actually
manually call XSD.EXE, I would l prefer to keep it all internal to VS.
All I am doing is updating the XSD in the XML view of a dataset schema,
which of course then generates the code upon save.

Do you know if there is any specification on how the XSD creates the
code in XSD.EXE from microsoft?

Many thanks,
Steven Nagy

Mar 20 '06 #3

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

Similar topics

2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
2
by: CoolPint | last post by:
Standard exception classes in C++ have what() which returns const char * and they have constructors accepting string. Where is that string created and when is the string destroyed? In the...
2
by: JS | last post by:
I'm trying to create a data layer and having problems returning a DataSet from my code that's in a class module. Please forgive me. I'm new to C# (VB'er). I decided to create my data layer in...
6
by: Esteban404 | last post by:
I'm trying to create a preview shot of a record being edited, so I want to take the current state and pass it to a instance of a form I have. I've tried to create a dataView and pass that, but it...
5
by: Anders Borum | last post by:
Hello! Whilst refactoring an application, I was looking at optimizing a ModelFactory with generics. Unfortunately, the business objects created by the ModelFactory doesn't provide public...
6
by: Billy | last post by:
I have created a typed dataset by dragging on a sql table on to the designer of the dataset and from there I can change the modifier of the tableadpater to 'internal' from 'public' thru the...
2
by: DB | last post by:
Hi I have a specific problem of Access to Internal IIS and therefore need to have two Web Services to return the Dataset from one of them. The Internal Web Service Returns a Dataset of Addresses...
1
by: Steven Nagy | last post by:
Hey All, I have written a tool that generates XML for a dataset. You know when you add a dataset file to a project, you write the XML and the code gets generated automatically? Well I want this...
13
by: Ramon F Herrera | last post by:
I am writing a program that generates source code. See a snippet below. My question is about the use of that growing 'code' variable. Is it efficient? Is is recommended for this case? The code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.