I have inherited (someone else built it) an ASP IIS site attached to a SQL
Server 2000 database. It is quite a large web site job and I don't want to
rewrite it in .NET. I don't have the time to do that and I am not familiar
with .NET. Our company still uses VB6 for our products.
The remote site allows the user to select recordsets which currently can be
emailed as HTML or TEXT and also downloaded in an Excel (XLS) file. My job
is to create XML from the recordset, transmit it to the client browser
(which is part of a VB program) and have the client program load it into the
local SQL Server database.
I am new at using XML and have done considerable reading (my head hurts).
Some of the books are a couple years old. The recordsets are composed of
header records from the main table and child records (one to many) from 3
other tables.
I am leaning toward using FOR XML EXPLICIT in conjunction with ADODB stream
sent to the Response object. I have gotten a simple FOR XML AUTO program to
work properly and send the stream back to the browser, but now I need to
shape the more complicated XML properly.
I just want to make sure that the FOR XML EXPLICIT will not become "legacy"
code in the next few years. I have looked at using XML Views briefly, but do
not like the setup required on the SQL server to use them. It will be a
hosted remote server that houses the IIS ASP code and the SQL database.
So before I spend weeks writing and debugging the process, I want to make
sure I haven't missed some spectacular new, reliable and "easy" method of
accomplishing the same thing.
Also I plan on using the Transact/SQL OPENXML function to write the
resulting XML to the database at the client site.
There is one other problem. Using the ADODB stream sent to the Response
object results in the XML remaining "hidden" (such that a blank page appears
in the browser) which is fine...except I don't know how to access it. I
have experience using XML data islands (in HTML pages) to populate SQL
Server and also opening XML files on disk and writting to SQL Server.
Thanks for your help in advance...
For XML Explicit is definitely supported in the next release of SQL Server.
There is also a For XML Path option in the next release that would be easier
for you to use but anything you do in Explicit mode should work for the
foreseeable future. OpenXML is also fully supported in SQL Server 2005.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"John Kotuby" <jkotuby@.snet.net> wrote in message
news:e5SLwHbaEHA.3684@.TK2MSFTNGP09.phx.gbl...
>I have inherited (someone else built it) an ASP IIS site attached to a SQL
> Server 2000 database. It is quite a large web site job and I don't want to
> rewrite it in .NET. I don't have the time to do that and I am not familiar
> with .NET. Our company still uses VB6 for our products.
> The remote site allows the user to select recordsets which currently can
> be
> emailed as HTML or TEXT and also downloaded in an Excel (XLS) file. My job
> is to create XML from the recordset, transmit it to the client browser
> (which is part of a VB program) and have the client program load it into
> the
> local SQL Server database.
> I am new at using XML and have done considerable reading (my head hurts).
> Some of the books are a couple years old. The recordsets are composed of
> header records from the main table and child records (one to many) from 3
> other tables.
> I am leaning toward using FOR XML EXPLICIT in conjunction with ADODB
> stream
> sent to the Response object. I have gotten a simple FOR XML AUTO program
> to
> work properly and send the stream back to the browser, but now I need to
> shape the more complicated XML properly.
> I just want to make sure that the FOR XML EXPLICIT will not become
> "legacy"
> code in the next few years. I have looked at using XML Views briefly, but
> do
> not like the setup required on the SQL server to use them. It will be a
> hosted remote server that houses the IIS ASP code and the SQL database.
> So before I spend weeks writing and debugging the process, I want to make
> sure I haven't missed some spectacular new, reliable and "easy" method of
> accomplishing the same thing.
> Also I plan on using the Transact/SQL OPENXML function to write the
> resulting XML to the database at the client site.
> There is one other problem. Using the ADODB stream sent to the Response
> object results in the XML remaining "hidden" (such that a blank page
> appears
> in the browser) which is fine...except I don't know how to access it. I
> have experience using XML data islands (in HTML pages) to populate SQL
> Server and also opening XML files on disk and writting to SQL Server.
> Thanks for your help in advance...
>
Friday, February 24, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment