SQL Server Static page export technology (SQL Server Web Assistant)

Source: Internet
Author: User
Tags goto insert web database
server|web| Static | Page This article extracts from the Railway publishing house new "use BackOffice to establish Intranet/extranet application" (now in the Haidian book city has been sold, the field or
Readers who need door-to-door can buy online on www.wanbook.com.cn or www.e-bookshop.com.cn. The book number is ISBN7113039448). This
The book details how to use the Microsoft BackOffice series products to build intranet/extranet applications. Through it you will master the installation and setup of NT, use
IIS establishes a Web site, creates a network conferencing system through ILS, builds mail and collaboration systems with Exchange, and builds a Web database with SQL Server
Use proxy server to establish a secure connection with the Internet, establish network TV/radio stations with Media server, and build functionality with Chart server
Powerful chat rooms, using Site Server to create personalized mailing lists and analysis of site visits, using Commerce Server to establish business-to-business or Business-to-consumer electronic Business
Service website. In addition, the book also discusses the security of the network, which guides you through a more robust and secure network application. After reading this book, you will
found that the implementation of the rich and colorful network applications originally so simple ...
Absolutely original, welcome to reprint. But make sure you keep the above text.


Finally, let's introduce the code for the part of the Export Date list page. We have previously produced a list page of dates through IDC technology, but when we export from a static page
The methods used are different. The previous page generated by IDC through the browser side through Java to complete each date to produce the final page of work. This can cause
The resulting paging file is too large. Because for each date, include the following section of Java code:
<script>
Yue1=yue2;
yue2=4;
if (yue1!=yue2) {
tt=0;
if (yue1==0) {
document.write (' <table border= "BORDER" align= "CENTER" ><th><tr></td><td> Monday </td><td> Tuesday </td><td> Wednesday </td><td> Thursday </td> <td> Friday </td><td> Saturday </td></tr><tr> ')
}else{
document.write (' </tr></table> ')
document.write (' <table border= "BORDER" align= "CENTER" ><th><tr></td><td> Monday </td><td> Tuesday </td><td> Wednesday </td><td> Thursday </td> <td> Friday </td><td> Saturday </td></tr><tr> ')
}
}
ri=22;
xingqi=5;
if (tt!=0) {
if (xingqi<7) {
document.write (' <td><font size= "+1" ><a href= "Goto.idc?day=1999-04-22"
target= "goto" ><b>22</b></a></FONT></td> ");
}else {
document.write (' <td><font size= "+1" ><a href= "Goto.idc?day=1999-04-22"
target= "goto" ><b>22</b></a></FONT></td></tr><tr> ");
}
}else{
Tt=1;
For (I=1;i < xingqi;i++) {
document.write (' <td></td> ');
}
document.write (' <td><font size= "+1" ><a href= "Goto.idc?day=1999-04-22"
target= "goto" ><b>22</b></a></FONT></td> ");
if (xingqi==7) {
document.write (' </tr><tr> ');
}
}
</script>
If you produce a page for one year's newspaper content, it may be larger than hundreds of KB. This is nothing for the LAN. These hundreds of KB
The user is generally unaware of the delay caused by the data. Because it takes less than a second to transfer this data over a local area network. And for the Internet
Users, they have to consider their limited bandwidth. The delay caused by such a large paging file is probably unacceptable to the user. So you have to shrink this page
The dimensions of the face file. We use cursors and flow control statements to perform the corresponding judgment work on the server side when the static page is exported. Thus only live
Produce "pure" HTML files. The following is the code snippet that implements this feature:
Declare
@dy int,
@date varchar (20),
@yue varchar (2),
@yue2 varchar (2),
@ri int,
@xingqi int,
@year int,
@outchar varchar (1600),
@tt int

CREATE TABLE # #daylist
(out varchar (1600))

Set @yue2 = ' 00 '
Set @tt =0

DECLARE POINT3 cursor FOR
SELECT DISTINCT
Dy=datepart (Dy,riqi), date=left (CONVERT (varchar), riqi,20), 10,
Yue=convert (varchar (2), DATEPART (Mm,riqi)), Ri=datepart (Dd,riqi), Xingqi=datepart (Dw,riqi), Year=datepart
(Yy,riqi)
From Gaojian
where Kanwu = ' publication '
ORDER BY Year,dy
For Read Only

Open Point3
Fetch POINT3 into
@dy, @date, @yue, @ri, @xingqi, @year
while (@ @fetch_status =0)
Begin
If @yue <> @yue2
Begin
Set @tt =0
If @yue2 =0
INSERT INTO # #daylist
VALUES (' <table border= "BORDER" align= "CENTER" ><th><tr>' Year ' + @yue + ' month </td><td> Friday </td><td> Saturday </td></tr> ')
Else
INSERT INTO # #daylist
VALUES (' </tr></table><table border= "BORDER" align= "CENTER" ><th><tr>CONVERT (varchar (4), @year) + ' year ' + @yue + ' month </td><td> Wednesday </td><td> Thursday </td><td> Friday </td><td> Saturday </td> </tr> ')
End
If @tt <>0
If @xingqi < 7
Set @outchar = @outchar + ' <td><a href= ' + @date + '/index.htm ' target= ' new ' > ' +convert (varchar (2), @ri)
+ ' </a></td> '
Else



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.