![]() |
Retrieving Data SQL from Database![]() ![]() ![]() ![]() ![]()
There are two different methods of generating XML from within SOL Server. You can either use Web Assistant Wizard, to create Web Tasks, which are automated tasks that run at specific intervals and generate either HTML or XML files, or you can use stored procedures to return results sets that are formatted into XML. In this chapter we will be using Web Assistant Wizard to create Web Task that generates the XML file, which retrieves the data from SOL database and displays it in the browser. Microsoft's SOL Server has a feature, which is meant to make the generation of HTML files from SOL statements easy. Since these types of reports are the same for all people who wish to review them, there is no reason to build custom Web software that interactively queries for the data and builds HTML results. All that really needs to happen is for a single session to. be created that generates one or more HTML pages. This is what Web Tasks were designed for. Web Tasks were meant to generate HTML. An XML specification had not been completed when Web Tasks were added to SOL Server. Web Tasks automatically creates the XML file based on the template created by the user and the settings given in the Web Assistant Wizard. This XML files retrieves the data from SOL Server and displays it to the user, when viewed from the browser. In the following exercise we will create a table called " BookInfo" with the columns BName, Author, AuthorADD, Phone, Publisher and PublisherADD in SOL Server database and insert few rows. We will create a template file called Booklnfo.tpl and use the Web Assistant Wizard to create the Booklnfo.xml file. The real flexibility of the template feature of SOL Server is the ability to use it to generate XML. The server does not care whether the f ile contains anything other than the keywords it uses to insert current row data. In this exercise we will create three files, one template file called Booklnfo.tpl, one DTD file called BookInfo.dtd and one CSS file called BookInfo.css. In the following template file the keywords <%begindetail%>, <%enddetail%> and <%insert data here%> are the ASP code,used to fetch the data from SOL database. <%begindetail%> and <%enddetail%> are used to mark the area where a given SOLquery's results set should be used to fill the <%insert data here%> statements. <%insert data here%> keyword indicates where column data should be placed from the results set.
|
|
Domain NamesXML HTML to XML Why XML? XML Example Program XML Structure XML Declaration Physical Structure in XML XML Syntax Well Formed and Valid Document Document Type Definition Logical Structures
Notation and Notation Declarations Entity References Importing an External DTD Cascading Style Sheets (XML) Rendering XML with CSS An Example Using CSS CSS Style Rules
XSL XSL Transformation XSL Formatting XSL Style Rules Schemas Limitations of DTD Validity of an XML Document
An Example using XML Schema Namespaces Xlinks and Xpointers Terminology Xlinks Extended Link Xpointers DOM and SAX What is DOM? The Basic Structure of an XML DOM-based Module What is SAX? When to use DOMWhen to use SAX Accessing the Database Using XML Delivering XML with Data Retrieving Data from SQL Database Using Web Assistant Wizard Displaying Records from the XML_EX Database Server Dynamic Web Publishing with Dynabase Enhydra Java/XML Application Server XML Server Technologies Purpose and Goal of the XML/EDI Guidelines Definitions for XML/EDI The Electronic Enterprise Server Scope of XML/EDI The Five Technologies of XML/EDI Integrating XML with EDI Ignore and Include Keywords XML/EDI Components The Implementation Process Identifying Data Sets Developing DTDs Application Specific Extensions XML and JAVA XML Application Architecture Channel Definition Format Creation of Channels Creating Channels Using CDF Document Description of the Channel Scheduling Logos Precaching Web Crawling Keeping Track of UsersWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |