Ok gurus, what would you do? I'm developing an app in C# and trying to
use SqlXml but there seems to be a problem at every turn. I want to
create a biz object that represents an order to sell a home. The
database schema for this order has about 15 related tables therefore I
need to also have 15 related biz classes (for my brokers, appraisals,
repairs, offers yada yada yada). The database schema may change
slightly from week to week with possibly new fields being added,
others being lengthed or changed from varchar to text, and possible a
new one-to-many relationship every blue moon or so.
So the requirements are:
1. Biz-specific objects with biz-specific methods
EXAMPLE: Order.AddAppraisal(new Appraisal(xxx));
EXAMPLE: iAppraisalCount = Order.Appraisals.Count;
2. Allow easy loading of the Order object and all it's related biz
objects with one statement
EXAMPLE: myOrder = new Order(iOrderId);
3. Provide single-method update capability to simplify development for
my GUI-tier developers
EXAMPLE: mySale.SaveToDatabase();
4. Minimize the amount of maintenance work to "redefine" the database
schema into XSD's or mapping-schemas.
I know #1 can be satisfied with a typed-dataset and #2 can be done by
inheriting from the Order class built by VS.Net from the typed-dataset
and adding my owning Load and Save routines. But #3 and #4 are
KILLING ME!! I thought that SqlXml was going to come to my rescue but
the more I've learned the more I feel like SqlXml is for amateurs. Can
anyone shed some light on the brick walls that I've been running into
below??
============ PROBLEMS ============
**I'd like to use SqlXml with DiffGrams but does that mean that I've
got to basically redo all the work that I put into designing the
database schema into an xsd mapping-schema with sql:xxx annotations?
What do I need to adorn: FKs, PKs, constraints, what else?
**Why doesn't VS.Net do any of this?
**Are there any tools that add the annotations like sql:field,
sql:relation, sql:relationship etc?
**If I were to build my own utility or add-in that fixed the VS.Net
typed-dataset xsd would that be the right approach? If so, would I
have to go trudging through SQLServer systables (or the
INFORMATION_SCHEMA views) to find all my FK's, PK's, constraints,
defaults, etc.? Am I going to know all of the correct metadata that
is needed by the SQLXML engine to properly annotate my XSD?
**Does SqlXml know how to properly apply deletes/inserts/updates in
the correct order for relational integrity?
**Am I wasting my time with Yukon on the way? When is it coming??
Where can I find info on the Yukon vision? Or is what I'm looking for
in the ADO.NET domain??
**Is the existing SqlXml layer a not-ready-for-prime-time player? Does
it require more work than it's worth? Why not stick to rolling my own
procs to update all of my tables and wrap things inside a transaction?
This seems silly when all of the relationship metadata is already
defined in SQLServer and I've got the entire relational model sitting
in my dataset.
**And how does SqlXml handle the following real-world data updating:
1. Denoting null values in the DiffGram.
2. Reporting errors when any TSQL statements don't work when using
SqlXmlAdapter.Update()
3. Refreshing my DataSet after inserts generate new AutoIncrement
fields.
4. Optimistic updates?
Thanks in advance for any thoughts. I really want to use SqlXml but
this is too painful!!!!!
mark 1 1761
"Mark Sisson" <ma**@corporatedigital.com> wrote in message
news:88**************************@posting.google.c om...
[snip] ============ PROBLEMS ============ **I'd like to use SqlXml with DiffGrams but does that mean that I've got to basically redo all the work that I put into designing the database schema into an xsd mapping-schema with sql:xxx annotations? What do I need to adorn: FKs, PKs, constraints, what else?
If you want to use DiffGrams, you will need an annotated schema.
**Why doesn't VS.Net do any of this?
I think it will begin to do this in the next version with the mapping files
(annotations are going away).
**Are there any tools that add the annotations like sql:field, sql:relation, sql:relationship etc?
Xml Spy does this: http://www.altova.com/features_sql.html
**If I were to build my own utility or add-in that fixed the VS.Net typed-dataset xsd would that be the right approach? If so, would I have to go trudging through SQLServer systables (or the INFORMATION_SCHEMA views) to find all my FK's, PK's, constraints, defaults, etc.? Am I going to know all of the correct metadata that is needed by the SQLXML engine to properly annotate my XSD?
Not sure what you mean here...
**Does SqlXml know how to properly apply deletes/inserts/updates in the correct order for relational integrity?
I think diffgrams are the only SqlXml option that provides this.
**Am I wasting my time with Yukon on the way? When is it coming?? Where can I find info on the Yukon vision? Or is what I'm looking for in the ADO.NET domain??
There are lots of good things on the way when it comes to SqlXml.
Yukon: http://www.microsoft.com/sql/yukon/productinfo/
Whidbey: http://msdn.microsoft.com/vstudio/whidbey/
**Is the existing SqlXml layer a not-ready-for-prime-time player? Does it require more work than it's worth? Why not stick to rolling my own procs to update all of my tables and wrap things inside a transaction? This seems silly when all of the relationship metadata is already defined in SQLServer and I've got the entire relational model sitting in my dataset.
Some parts of SqlXml definately require a lot of work. You have to decide if
it is worth it.
**And how does SqlXml handle the following real-world data updating: 1. Denoting null values in the DiffGram. 2. Reporting errors when any TSQL statements don't work when using SqlXmlAdapter.Update() 3. Refreshing my DataSet after inserts generate new AutoIncrement fields. 4. Optimistic updates?
I haven't spent a lot of time using the Diffgram/DataSet approach. Most of
the SqlXml work that I do now consists of using Xml Serialization to map
data from SQL Server to business objects.
--
Bryant This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ralph Krausse |
last post by:
Hello all,
Newbie here and have a few questions. I wish to use the classes
SqlXmlAdapter,SqlXmlCommand,etc in my ASP.NET project but when I add
'using Microsoft.Data.SqlXml', the IDE doesn't see...
|
by: Nick Chan |
last post by:
hello i exposed some stored procs as web methods, is there a way to
use authentication? i just want to set only me can use it. And is
there a way to save the SQLXML IIS Settings and export to...
|
by: Paula DiTallo |
last post by:
Hello Techies--
I am reading an XML document with many nested elements. Many of these
elements go to such a variety of tables, that I am trying to simply
the read of the document by dumping the...
|
by: norm dingle |
last post by:
Does anyone know how to get the managed classes for sqlxml loaded?
I can not seem to get them to load.
Thanks
norm
|
by: Hollywood |
last post by:
I have the following XSD created in VS.NET 2003:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="ReferralSchama" targetNamespace="http://test.org/Referral"...
|
by: Don |
last post by:
Hi:
When I read my sqlxml results into a reader and deserialize it, I only get
the first record deserialized into my object.
If I have five records, they're all in the reader. But how do I get...
|
by: campwes |
last post by:
Hey, all! We're having trouble displaying SQL Server data in a web site as
XML, using a transform. The query is a simple SELECT statement. When
running the query, we get the following error from...
|
by: RJ |
last post by:
I saw an article on MSDN knowledge base that explains how to use a SQLXML
tool ( IIS Configuration ) to select a stored procedure and generate a web
service wrapper. I noticed that the example to...
|
by: Mark Sisson |
last post by:
Ok gurus, what would you do? I'm developing an app in C# and trying to
use SqlXml but there seems to be a problem at every turn. I want to
create a biz object that represents an order to sell a...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
| |