Groups | Blog | Home
all groups > dotnet xml > october 2005 >

dotnet xml : Generating the code to turn an XML schema into support for a datas


Al Christoph
10/30/2005 10:16:06 AM
Please forgive me if this is the wrong place to post this. The last place I
posted got me a fairly rude response. I guess vb.db people just don't want to
think about XML as database. At any rate, here is what I posted:

I have downloaded the final production version of VS 2005 pro after testing
with Team version. I wonder if I've been screwed or if it's just too early on
a Sunday morning.

It seems to me that it was relatively trivial to generate a dataset from an
XML schema in Team. I can't for the life of me find a way to do that in PRO.
Is this correct. Do I have to hand generate the logic for the
dataset.designer.vb???????


Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
stcheng NO[at]SPAM online.microsoft.com
10/31/2005 10:15:58 AM
Hi AI,

Welcome. Regarding on the "Team version" you mentioned, do you means
you're testing the team system feature in released VS.NET 2005 professional
edition? If so, would you provide some further background of your current
scenario so that we can get a more detaild view of your problem. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Generating the code to turn an XML schema into support for
a datas
| thread-index: AcXdff7Hh+mAv/+9RRuNxOuTiL3b2g==
| X-WBNR-Posting-Host: 67.38.9.125
| From: =?Utf-8?B?QWwgQ2hyaXN0b3Bo?=
<AlFrom3BearsSoftware@newsgroups.nospam>
| Subject: Generating the code to turn an XML schema into support for a
datas
| Date: Sun, 30 Oct 2005 10:16:06 -0800
| Lines: 19
| Message-ID: <BB539EFC-8618-4296-BB30-3587E81BCE65@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.xml
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.xml:9124
| X-Tomcat-NG: microsoft.public.dotnet.xml
|
| Please forgive me if this is the wrong place to post this. The last place
I
| posted got me a fairly rude response. I guess vb.db people just don't
want to
| think about XML as database. At any rate, here is what I posted:
|
| I have downloaded the final production version of VS 2005 pro after
testing
| with Team version. I wonder if I've been screwed or if it's just too
early on
| a Sunday morning.
|
| It seems to me that it was relatively trivial to generate a dataset from
an
| XML schema in Team. I can't for the life of me find a way to do that in
PRO.
| Is this correct. Do I have to hand generate the logic for the
| dataset.designer.vb???????
|
|
| Regards,
| Al Christoph
| Senior Consultant and Proprietor
| Three Bears Software, LLC
| just right software @ just right prices @3bears.biz
|
Peter Flynn
10/31/2005 10:40:39 PM
[quoted text, click to view]

They may be right. XML is a markup language, not a DBMS. There are
a lot of similarities, but a scary number of differences too.

///Peter
--
Al Christoph
11/2/2005 12:18:05 PM
Thanks for the reply. I acknowledge what you are saying. This is NOT a
database application. We have traditionally used Access to store a large
amount of relatively infrequently chagned data. That led to DLL hell as we
distributed our software free in support of sales of the stuff the company
really makes.

SOOOO ... In the all new 2005 version, we are probably gong to use XML to
store the info and read the whole thing into memory as a set of tables in one
line of code. (Something which took 1000's of lines of code in the version I
inherited:-( Don't ask:-)

Once we've read the whole gorilla into memory (a blink of an eye even though
it has been compressed and encrypted - good going folks!) we want to treat it
as if it really were a data base for some purposes.

It strikes me that there is a tool that given the XML will create the
..designer.vb code to provide for properties to reference columns and rows and
etc. I thought I remember that as a schema or data pick in earlier stuff
(2003 or the early releases I just don't know at this point.) Hence my
request for a comparison chart or other way of understanding what disppears
from the IDE if I buy Pro rather than Team.

A good way of understanding what I need is to bring an SQL or Access DB into
the solution. At that point you have all sorts of goodies lurking in
<dataset>.designer.vb that I hope that I don't have to manually generate if
all I'm working with is an XML schema.

To put it another way:
1. Design an XML schema.
2. Try opening it with the dataset editor - won't let you without a fight.
3. Wave the magic wand.
4. Now try opening it with the dataset editor and you see just what you want.

WHAT IS THE MAGIC WAND?-)

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz


[quoted text, click to view]
Al Christoph
11/2/2005 12:25:07 PM
Steven: Thanks for the response. I've been using VS 2003 as distributed in
MSDN plus the various versions of VS 2005 as they have been posted, namely
the team version. Since i'm likely to be using the pro version in the future
I was concerned if the feature that I vaguely remembered had disappeared. I
hope that this clarifies things a bit.

As to what I'm trying to accomplish I've outlined that in detail in a
separate posting.

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz


[quoted text, click to view]
Al Christoph
11/2/2005 12:51:04 PM
Well I want some of what somebody has been smoking:-)

If you open VS 2003 / VB and open schema.xsd, on the schema menu at the
bottom you will find "Generate Dataset". THAT'S what i've been trying to
find. Seems to have disappeared in the versions that I'm using of 2005!

I do see that there is an xsd.exe that will do what I want.

What happened to the menu pick?????

--
Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz


[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
11/3/2005 12:00:00 AM
Hi Al,

In VS.NET 2005, you needn't check Generate DataSet from the menu to
generate dataset classes. After you modify the DataSet schema, you just
save the .xsd file and the .Designer.vb file will be generated
automatically. I tried on the pro edtion of VS.NET 2005 and it works fine.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Al Christoph
11/3/2005 2:34:03 AM
Thanks for the reply. You are a hero, I think.

But your response took me back to my main frame days (starting in 1966) and
the sides were switched and I knew what I was doing and others looked to me
for help. I'd often ask in those circumstances "have you sacrificed any
virgins lately."

Obviously, you have, and I haven't. The dataset code is NOT being generated
automagically for me when I save the xsd. I was going to ask you what
special settings you had. OTH perhaps the operative phrase in you reply is
"DATASET schema".

(Time out for testing of an idea:-)))

Hmmmm ... You are a hero. You made me sacrifice a virgin. I've been STUPID
or LAZY or the GUI for generating new thingies is too complicated or I just
didn't look.
The TECHNICAL PROBLEM is that i've been generating new XML SCHEMAS not new
DATASETS. And that's the answer.

Hint to MS people. The new thingie window needs to have a button like that
in the open file dialog that gives you an alphabetical list view (My much
preferred explorer view is details, if you get my meaning.) An alphabetical
list probably would have helped me avoid this error.

This closes this problem. Thanks to all who responded. In working this I
also discovered XSD.EXE and so was able to make very good progress on the
program yesterday.

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz


[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
11/4/2005 12:00:00 AM
Sorry, Al, I didn't query enough information from you. So do you mean that
you are designing an Xml schema in the DataSet designer? If so, it is true
that the generation will not work, because the schema has to be a DataSet
schema. If you're designing an Xml schema, please try to add an Xml Schema
in the Add new item dialog. Is there any misunderstanding here?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Al Christoph
11/4/2005 2:35:02 AM
Two things happened in my last post and I apologize for not being clear. I
was being rather flippant / stream of consciousness. (It's not nice to mimic
James Joyce when one isn't Joyce nor when one is doing techie writing:-) PLUS
I was solving my blindness problem as I wrote.

My problem was that I was too fixated on XML and completely overlooked the
Dataset object in the add new window.

If I had added a Dataset instead of an XML schema then I would not have had
any problems at all!

I want a dataset internally pointing to an XML file externally. This is easy
provided you start with generating the dataset.

What I don't remember is whether in earlier releases you could start with an
XML Schema, click generate dataset, and end up with a dataset. I think you
could. And it was that missing Schema | Generate dataset command (which I
never really understood - I sure do now) that i'd been mistakenly looking
for. What I should have been looking for was the Add new Dataset :-) Removing
the command caused me grief but I think it probably clarifies things a lot
and probably represents some philosophical change in the wind as MS which is
beyond me and probably unimmportant to my work.

I can read the xml into my DS's just fine and I can save the DS's as
encrypted zipped XML with metadata just fine. (The meta data at the beginning
of the file gets encrypted and zipped too, which I don't like, but I"m too
lazy to figure out the stack of usings that will work:-) Here I go being
Joyce again.

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz


[quoted text, click to view]
v-kevy NO[at]SPAM online.microsoft.com
11/5/2005 12:00:00 AM
Nice to know that you have got things clear. :-)

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