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

Strong Type Class Generator

Does anyone know if there is a utility that VS uses to generate the Strongly
Typed Dataset classes for C#? Right now, it blows when you try to have a
default on a DateTime column because a DateTime is not CLS compliant.

BTW, what date / time type are we supposed to use if we need CLS
compliance???
Nov 16 '05 #1
9 1540
BTW, what date / time type are we supposed to use if we need CLS
compliance???


You've *really* got to stop posting the same question everywhere. Its
obnoxious and won't help you get your question answered.
Nov 16 '05 #2
OK, Dannyboy, you tell my company to put OE back on my computer or re-write
Microsoft's H&S front end or stop complaining. I was using OE until two
days ago when my company removed it for security reasons. I needed to ask a
simple question in the news groups and Microsoft's H&S front end does *NOT*
allow mutli-group posting.

"Daniel O'Connell [C# MVP]" wrote:
BTW, what date / time type are we supposed to use if we need CLS
compliance???


You've *really* got to stop posting the same question everywhere. Its
obnoxious and won't help you get your question answered.

Nov 16 '05 #3

"John Mark Howell" <Jo************@discussions.microsoft.com> wrote in
message news:95**********************************@microsof t.com...
OK, Dannyboy, you tell my company to put OE back on my computer or
re-write
Microsoft's H&S front end or stop complaining. I was using OE until two
days ago when my company removed it for security reasons. I needed to ask
a
simple question in the news groups and Microsoft's H&S front end does
*NOT*
allow mutli-group posting.


*ONE* bloody question in *ONE* newsgroup would have done fine, most people
read a wide range of them, I obviously do. Instead you have the same
question across a half dozen groups(some of which with different
information) and a different set of threads going in atleast three of them
now.

Your question really isn't important enough to need to ask it in every
single group that it even has a passing resemblence to being ontopic on.
Nov 16 '05 #4
Well, Dannyboy, since you have declared that no one in Microsoft's
newsgroups should multi-group post, and you've flamed me twice, you must be
so unbelievably smart that you should be able to answer this simple
question, shouldn't you? Or is this one too tough for even the great Danny
O.
Answer this and I'll post an apology to you in every group I posted in.

How do I put a default on a DateTime field in an XSD for Visual Studio to
correctly generate the CS with the default coded for the column? I don't
want to you simply say, "It can't be done". I also don't want you to tell
me to simply "edit the CS after it is generated". I also don't want you to
say "it will work in whidbey". Let's see what you can come up with.
Nov 16 '05 #5
> Well, Dannyboy, since you have declared that no one in Microsoft's
newsgroups should multi-group post, and you've flamed me twice, you must
be so unbelievably smart that you should be able to answer this simple
question, shouldn't you? Or is this one too tough for even the great
Danny O.
You want a flame? Ok, got one for ya...You are an idiot. Your logic is
throughly flawed and your arguments are extremely personal. Your rude,
unable to form a clear question, and quite unworth answering. Furthermore, I
have declared nothing. Multiposting like this is, in general, rude and
unhelpful. It irks the people who are here trying to help you as they have
to pay attention across multiple groups(especially when the poster is
incapable of responding to one without refering or inferencing the other)
and it marks you as lazy, impatient, and a bit self important.

Had I noticed that you multiposted, I likely would have not bothered
responding at all. There are thousands of messages here, billboarding, clock
advancing, and multiposting do little but push you towards the back of the
queue, if not off it entirely.

I doubt I'm alone on that.
How do I put a default on a DateTime field in an XSD for Visual Studio to
correctly generate the CS with the default coded for the column? I don't
want to you simply say, "It can't be done". I also don't want you to
tell me to simply "edit the CS after it is generated". I also don't want
you to say "it will work in whidbey". Let's see what you can come up
with.

I can tell you that xsd.exe\MSDataSetGenerator is lacking in a number of
ways atleast in 2k3, I've never tried it on whidbey so I couldn't say. And I
will also tell you that you would have a better shot at getting an answer on
a data or xml group than you will here. I despise XSD and pretty much avoid
datasets at all costs(I prefer entity objects combined with data readers).

And, fwiw, DataSet supports a WriteXml method that can spit out a schema
using a particular XmlWriteMode enumeration member. Perhaps you can pump out
a column with a default value, write the schema, and see what that produces?
If the generated dataset doesn't produce a column default, I would imagine
the generator simply doesn't support it.

If that doesn't work, you might also want to consider a replacement dataset
generator. I don't know of any off hand, as I've said before its not really
my core competency.

Repost your query into the ado group, they will likely know more about
strongly typed datasets.
Nov 16 '05 #6
You are calling me rude?!? You are saying that my remarks are personal?!?!?
You just called me an idiot! You said my logic is flawed and you have no
idea what I'm coding! You started this flame thread not me. But you know
what, as much as I'm itching to flame you back, I will not. Not because I
don't want to, but I feel everyone is entitled to their own opinions, even
you. I should not have called you Dannyboy and for that one I do apologize.
I should have just informed you that I don't agree with you. I do not
apologize for multi-group posting. I needed an urgent answer. 90% of the
time I find my answer by Googling even before I do any posting, but not this
time.
I despise XSD and pretty much avoid datasets at all costs(I prefer entity objects combined with data readers).

I am in agreement, however, I'm in a group project and this is a requirement
so I have to support it.
DataSet supports a WriteXml method


I did try that. I can build the XSD, I just cannot get the
StronglyTypedClass generator to generate it.

As for a solution, I will re-post to the ADO group and see if someone there
has insight to this problem. Thanks for your suggestions.
Nov 16 '05 #7

"John Mark Howell" <Jo************@discussions.microsoft.com> wrote in
message news:F1**********************************@microsof t.com...
You are calling me rude?!? You are saying that my remarks are
personal?!?!?
You just called me an idiot! You said my logic is flawed and you have no
Your logic is flawed inasmuch as that I'm going to know an answer simply
because I don't like your multiposting, and, secondly, that you don't want a
"it can't be done" answer.

Sometimes, sadly, that is the answer.
idea what I'm coding! You started this flame thread not me. But you know No, I simply suggested, a touch harshly perhaps, that multiposting was not
the best way to get an answer. Again, I would not have replied had I seen
the multipost. I'm sure you lost some other potential respondants for the
same reason.

I despise XSD and pretty much avoid

datasets at all costs(I prefer entity objects combined with data readers).

I am in agreement, however, I'm in a group project and this is a
requirement
so I have to support it.

Ya, sometimes you get stuck with that, however, you'll have to work around
it or make your case for entity objects.
DataSet supports a WriteXml method


I did try that. I can build the XSD, I just cannot get the
StronglyTypedClass generator to generate it.


Then I suspect that the generator simply doesn't support the feature.
As for a solution, I will re-post to the ADO group and see if someone
there
has insight to this problem. Thanks for your suggestions.


Good luck.
Nov 16 '05 #8
I thought you might be interested in this. The tool that is used is XSD.EXE
in the .Net SDK.
ms-help://MS.MSDNQTR.2004JUL.1033/cpguide/html/cpconGeneratingStronglyTypedDataSet.htm

I don't know what features are and are not supported. When I find out, I'll
let you know.
Thanks again.
Nov 16 '05 #9
There is a utility called xsd.exe but whether or not, VS.Net uses it I
cannot vouch for. Anyway, why don't you use the FillSchema method of the
dataadapter to fill the dataset with the schema then work out the other
aspects of developing a strongly typed dataset. The FillSchema method
usually suffices, though your requirements may require more.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #10

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

Similar topics

1
by: Ulf Heyder | last post by:
Hello, I have to deal with some xml schemas from a third party. This schema contains the following complex type. <?xml version="1.0"?> <xsd:schema ... elementFormDefault="qualified"> .......
129
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
9
by: Stu Banter | last post by:
Hi, On a previous question someone recommended using the System.Security.Cryptography to fill an array with strong random bytes. It works but I can't specify the max value of course.. I solved...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
3
by: Chris Thunell | last post by:
I have 2 forms, on 1 form i use the wizards to create a strong typed dataset with tables from an SQL database... and from that i can do stuff like: me.daEmployee.fill(me.dataset11.tblEmployee) ...
1
by: lit | last post by:
I want to use Type.GetType(typeName) for a class defined in an assembly that will be in the GAC. I understand that I must provide strong name information such as the KeyPair or versioninfo in the...
9
by: David Trimboli | last post by:
In designing some of my pages (see http://www.trimboli.name/rune/goblinmagic.html for an example), I created a lot of markup to mimic the book upon which the pages are based. My thinking at the...
10
by: =?Utf-8?B?SmFjayBTbWl0aA==?= | last post by:
Hello, I have a solution that contains a C# application that is installed and runs as a service. The solution also contains several DLLs, some of which are C# assemblies and some are C++ DLLs. ...
0
by: ManicQin | last post by:
Hello everyone and especially Kai-Uwe Bux A month ago I post a question in the same name of this one but I didnt managed to explain my question right, so people didn't understand me. Now when I...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.