Feed on
Subscription

ASP is entered rank tutorial Ⅱ :A simple visitors' book

Begin us from this chapter will by simple,Use a file to store the tutorial that visits the visitors' book program that leave a message to enter us.Write a such visitors' book,We are roughly OK from the following three move will finish.

Measure one:Design to leave a message first the webpage that expresses sheet (be like:Guestbook1.asp,This need not I preached here?) .See figure below:


Measure two:Good in the design leave a message after the table is simple,The ASP program that we begin to undertake writing handling leaving a message.

We should write     the ASP program that processing leaves a message,The most serious problem is how to come true access leave a message.And in ASP program,Should access a file,We must establish FileSystemObject target (the document that this object basically uses at reading to take Unicode or ASCII yard) .And should establish FileSystemObject target,The statement that we can make in order to falls again:
= CREATEOBJECT of example of object of SET of   of       ("SCRIPTING.FILESYSTEMOBJECT" )
The method of FileSystemObject object includes:CreateTextFile and OpenTextFile:
CreateTextFile:Build name of a file,Return object of a TextStream to offer you to read keep a file
OpenTextFile:After the file that opens to already existed builds object of a TextStream to write a file to be being built and open to be able to offer editorial document with offerring you to read,The methodological WriteLine(that we can call TextStream object to fall finally keeps information into the document that reachs to already was opened and line feed) read with methodological ReadLine(take the group that already opened a file information) will access a file.
    because of this,Want implementation to access the ASP program that leave a message,We can be conceived as follows roughly:
    establishs FileSystemObject target first;Call OpenTextFile to open a file to perhaps call CreateTextFile to found new document next through this object,Establish TextStream target;The WriteLine that we undertake calling TextStream boy or girl friend again finally and ReadLine undertake access a file.After solving this main problem,The ASP program that we can leave a message processing writes place to show:  of      
%26lt;%
Name = Request("Name" ) )
Email = Request("Email" )
Subject = Request("Subject" )
Memo = Request("Memo" )
' from leave a message watch sheet obtains data
If Name = "" Or Email = "" Or Subject = "" Or Memo = "" Then
Response.Write " inputs casing to cannot be blank! Response.Write " inputs casing to cannot be blank!!
Response.End
End If
Whether does the each input casing with ' examination simple table have information to input,If leave available input casing to was not filled,show demonstrative information:"Input casing cannot be blank! "Stop to execute the order below.?
Line1 = " leaves a message person:"%26 Name
Line1 = Line1 %26 String(5, "  " )
Email = "%26lt;A HREF=mailto:" %26amp; Email %26amp; %26quot;%26gt;%26quot; %26amp; Email %26amp; %26quot;%26lt;/ A%26gt; %26quot;
Line1 = Line1 %26 "Email?"%26 Email %26 "%26lt;BR%26gt; %26quot;
Line2 = " advocate problem:"%26 Subject %26 "%26lt;BR%26gt; %26quot;
Memo = Replace(Memo, vbCrLf, vbCrLf,, %26lt;BR%26gt;%26quot; )
Line3 = "%26lt;TABLE BORDER=1%26gt;%26lt;TR%26gt;%26lt;TD%26gt; %26quot;
Line3 = Line3 %26 " your leave a message:"%26 Memo %26 "%26lt;/ TD%26gt;%26lt;/ TR%26gt;%26lt;/ TABLE%26gt; %26quot;
When Line4 = " :"%26 Now()
The indication format that ' definition leaves a message,Leave a message among them information rises with message convention.
On Error Resume Next
If carry out the ReadAll below,' avoids (read take all news that already opened a file) when,The case that cannot read the program error that takes information to be caused happens,Because this joins this to be used at oversight all mistakes.
Set Fso = Server.CreateObject("Scripting.FileSystemObject" ) Application.Lock
TxtPath = Server.MapPath("book1.txt" )
NewPath = Server.MapPath("newbook.txt" )
Fso.MoveFile TxtPath, newPath
Set Fin = Fso.OpenTextFile(NewPath, , true)
Set Fout = Fso.CreateTextFile(TxtPath)
' establishs FileSystemObject target,Lock up decide Application object,Do not let two any person that get online be carried out at the same time leave a message operation,Be built at the same time and open object of a TextStream,Point to should operate to going actually,The text Book1.txt that is used at leaving a message to record.
Fout.WriteLine Line1
Fout.WriteLine Line2
Fout.WriteLine Line3
Fout.WriteLine Line4
Fout.WriteLine "%26lt;Hr%26gt; %26quot;
Fout.WriteLine Fin.ReadAll
' leave a message in the file that branch keeps the information in expressing sheet to already was opened.
Fin.Close
Fso.DeleteFile NewPath, true
Application.UnLock
Response.Redirect "guestbook1.asp "
' is shut and delete Gbookold.txt,Remove next the lock of Application object is decided,Again how-to client carries a browser to arrive new Web page Guestbook1.asp.
%%26gt;
    to your notebook afore-mentioned code COPY,Notice:Should write down will ally %26quot; %26lt; %26quot; the blank space take out that adds more at the back of the symbol,Put into file Manage1.asp next.

Measure three:The design leaves a message page

    leaves a message because of what we want this visitors' book show in leave a message below watch sheet,So we can go to COPY of code of the following HTML the final area of Guestbook1.asp.
%26lt;Html%26gt;
%26lt;Head%26gt;
%26lt;Meta Http-equiv= %26quot;Content-Type%26quot; Content= %26quot;text/html; Charset=gb2312%26quot; %26gt;
%26lt;Title%26gt; your leave a message%26lt;/ Title%26gt;
%26lt;Link Rel= "stylesheet" Href= " . . / Images/Text.css%26quot; %26gt;
%26lt;/ Head%26gt;
%26lt;Body TEXT= %26quot;#000000%26quot; BGCOLOR= %26quot;#FFFFFF%26quot; BACKGROUND= %26quot;b01.jpg%26quot; %26gt;
%26lt;H2 ALIGN= %26quot;CENTER%26quot; %26gt; your leave a message%26lt;/ H2%26gt;
%26lt;Hr Noshade Color= %26quot;red%26quot; %26gt;
%26lt;! - - #include File= "book1.txt "- - %26gt;
%26lt;/ Body%26gt;
%26lt;/ Html%26gt;
%26lt;% Response.End %%26gt;

After     completes afore-mentioned all step,The executable fictitious list that maintains Guestbook1.asp and Manage1.asp existence WEB server (be like:Below Asp/) ,The means that uses HTTP in the browser undertakes browsing,Be like:Http://yourcomputername/asp/guestbook1.asp.Look!So simple,You had had your visitors' book.Still do not try at once!

...

ASP is entered rank tutorial Ⅰ :Successive learns to leave a message thin

How to write oneself like leave a message thin?The article will be a center with Active Server Pages,Reveal made process in the round to you,Use much example successive ground to undertake explain and demonstrating for everybody,The gate that lets you cross ASP easily.Before learning applied ASP of course,Let us see ASP have what advantage after all first.
    ASP (dynamic webpage of Active Server Pages) ,It is a kind of in order to that Microsoft rolls out replaces CGI (the technology of interface of general gateway of Common Gateway Interface) .We can combine the respect knowledge such as instruction of HTML language, ASP and ActiveX component and database through ASP,The site of seesaw pattern Web that the Web server that uses his is founded and runs trends.The main good point of ASP can induce as follows probably:

    1, you can use VBScript or JScript founds script,Combine HTML language at the same time can special the applied program that completes a website conveniently.To VBScript and JScript,It use which kinds of language is not important to use which kinds of language,Web server is equal the ground handles these two kinds of languages,Send HTML format to turn a result to the browser of the user.

    2, because ASP uses Script language (VBScript and JScript) can write a program easily,The time that accordingly this saved a network to design personnel to must relearn character of a kind of neologism again greatly.And write ASP to manual Compile is compiled or need not link a program,Can carry out directly in server end,This is more convenient undoubtedly our write a process. 

    3, the text editor that uses common use notebook and so on,Can undertake editing designing, be like:The notebook of Windows.The proposal does not use FontPage98 or the software that make revises the homepage such as DreamWeaver2.0,Because they meet those who destroy source code.Here the CuteHTML editor that I suggest use CuteFTP is carried undertakes editing designing. 
    4, ASP is to move in the server to carry,So we need not fear whether the browser supports the programming language that ASP place uses, the browser that the client side wants to use executable HTML to pile up only,The webpage content that can browse place of Active Server Pages to design.ASP moves in server end,Carry out when the program after ending,The server returns executive result client browser only,The burden that also reduced a client to carry a browser so,Rose greatly interactive speed.

    5, ASP can be allowed with photographs of any ActiveX Scripting language.Besides can be designed with VBScript or JScript language,The kind that still carries Plug-in,Use the other scenario language that provides by tripartite place,For example Perl, Tcl.The component of COM(Component Object Model) that script engine is processing script program.
 
    6, the program code of Active Server Pages is concealed,Can see the dynamic HTML document that outputs by ASP only on client end.The source program that can avoid to write consequently by other piracy,The security that also increased an order. 

    7, the script that the script that can use a server to carry will come to to produce a client to carry. 

    8, object-oriented (Object Oriented) ,Can expand function of ActiveX Server component. 

    9, component of server of ActiveX Server Components(ActiveX) have infinite but expanding.The component of ActiveX Server that you can use any programming language to write your place to need.

    10, can pass ADO (ActiveX Data Objects, a kind of of Microsoft new data visits a model,It is a kind of database that can offer WEB page developer to access Internet easily,Can go up in net of client side implementation instantly, the skill of database of newest WEB page that demonstrates newlier immediately.) special visit a database conveniently,It is easy to make access a database to become relaxed thereby.

    saw the advantage with so many ASP,Whether to begin to feel enchanted!Want to learn ASP actually,The methodological nothing is more... than that my individual feels the most effective:Go up from the network first the free example that a few others of Download provide,Reentry him travel is adapted;Encounter not obvious place we can search relevant data,Perhaps go to forum of a few ASP directly to us " prawn " people ask for advice.   
    became good,Told this a lot of,We also this return to the subject.So the tutorial that since below one chapter we begin to begin us from a the simplest text visitors' book.
...

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (six)

6, knot talking



    I people send the benefit that extend to use ISAPI to be added according to be being added in the library to number remember the square law of the collection
Do not need to want to be carried in DOS show accord with to fall to allow why to be held all right.Additional outside,I people several
According to civil in can wrap contain write number to occupy to make up civil with door add carry show
Word accord with,In lift the magic figures drawn by Taoist priests to invoke or expel spirits and bring good or ill fortune that show a word and can not adding number to occupy a library,And Microsoft SQL
The Bcp life of Server makes do not have law choosing to be counted slightly suddenly surely according to civil hold the post of mediumly why word accord with,
Can occupy number only civil medium place has several to occupy beat shellfish to occupy a library to number in.With
When,Hind person need to be carried in DOS show symbol next make drill.



    benefit makes order of the Cheng that join each other with ISAPI not only but number of solid sth resembling a net showing a network is checked according to the library
Ask,And and can occupy a library to be written down mediumly to number record into hold all right (add add, long change,
Cutout is divided etc) .The general that letting Windows NT make use and,Of ISAPI should use model surround will
Can float more....

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (five)

5, be defeated by number to occupy civil of renown bound face make up write

Article of     HTML be connect in general civil this in insert HTML mark to know accord with,WWW clear is seen implement had connected knowledge fasten HTML article medium mark knows accord with,By according to HTML article medium mark knowledge accord with is shown decided case form is shown show civil.Next faces give piece to in medicine counts the watch that occupy a library add in CMT1 add write down of the collection be defeated by number to occupy civil the HTML of renown bound face provides body to write a law,This article take a name to be FileWrite1.html.

%26lt;Html%26gt;
%26lt;Body Bgcolor= %26quot;white%26quot; %26gt;
%26lt;Center%26gt;
%26lt;H2%26gt;%26lt;P%26gt;%26lt;Font Color = %26quot;#FF0000%26quot; %26gt; adds a record to Chinese traditional medicine to express one%26lt;/ Font%26gt;%26lt;/ P%26gt;%26lt;/ H2%26gt;
%26lt;Hr%26gt;
%26lt;H3%26gt; inputs file name please: %26amp;Lt; /h3%26gt;
%26lt;Form Action= "/scripts/Zy.dll? FileWrite1Entry%26quot; Method= %26quot;post%26quot; %26gt;
%26lt;P%26gt;%26lt;Input Name= %26quot;FileName%26quot; Size=40%26gt;%26lt;/ P%26gt;
%26lt;Input Type= %26quot;submit%26quot; Value= %26quot; refers %26quot; %26gt;
%26lt;%26quot; %26gt; of replacement of Input Type= %26quot;reset%26quot; Value= %26quot;
%26lt;/ Form%26gt;
%26lt;/ Center%26gt;
%26lt;/ Body%26gt;
%26lt;/ Html%26gt;


    enters Http://webserver/FileWrite1.html in the key in the URL of Netscape or Internet Explorer,The Webserver in its is to take Wu implement name or take Wu implement region name,Can show on screen act show be defeated by number to occupy civil the bound face of the name,The root is carried according to bound face show number is defeated to occupy in expressing column civil renown,Carry breath of letter of make a present of is turned over to be in what guest door carries to show after handing in show...

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (four)

4, ISAPI should use Cheng order make up write

    I people benefit uses SQL language sentence can embed in should use Cheng order nod especially,SQL have close to be begged please language sentence embed order of each other Cheng is delivered in ISAPI in.ISAPI hands in foreword of each other Cheng to be made up with Visual C++ write,It is in order to fall solid now to in the watch that medical number occupies a library is added in CMT1 add write down of the collection advocate foreword wanting Cheng paragraph:

   
    / / build establish a CZY kind case of the member that become counts FileWrite1Entry,Solid now to in the watch that medical number occupies a library is added in CMT1 add write down collection
Void CZY: FileWrite1Entry(CHttpServerContext* PCtxt, LPTSTR PstrFileName)
{
  of   of     Const Unsigned REC_NUM=1; / / REC_NUM (a number is recorded in data file)
  of   of   of   of     Const Unsigned LINE=9; / / LINE (a number of region of the data in the watch)
  of   of     Const Unsigned COLUMN=6000; / / COLUMN (every data inside the country the biggest number of character)
    Char C, data[LINE][COLUMN];
    FILE *fp;
  of   of   of   of     StartContent(pCtxt); / / HTML head format
  of   of   of   of   of   of     WriteTitle(pCtxt); / / HTML caption
    Cstring StringSql;
    Cstring StrQuery;
    Cstring StrOutput;
    Cstring PstrZY00, pstrZY01, pstrZY02, pstrZY03, pstrZY04, pstrZY05,
  of   of   of       PstrZY06, pstrZY07, pstrZY08;
    / / the document that reads the means of " to open file name to be PstrFileName with "
    If (! (Fp = Fopen (pstrFileName, "R" )) )
    {
%26lt; of   of *pCtxt   of   of      %26lt;< of   of *pCtxt   of   of      %26lt;Center%26gt;%26lt;Font Color='red'%26gt;Warning: %26lt;/ Font%26gt;Cannot Open This File. %26lt;/ Center%26gt;%26quot; ;
Return; of   of      
    }
    / / read access to occupy from inside the file
    For(int K=0; K%26lt;REC_NUM; K++ )
    {
For(int I=0; I of   of      %26lt;LINE; I++ )
{of   of      
  of   of   of       / / the demonstrative sex character before oversight "{"
Do{of   of   of   of      
C=getc(fp); of   of   of   of   of   of      
  of   of   of       }while(c! ='{');
  of   of   of       / / read take the character data between "{" and "}"
For(int J=0; J of   of   of   of      %26lt;COLUMN; J++ )
{of   of   of   of      
C=getc(fp); of   of   of   of   of   of      
If(c of   of   of   of   of   of      =='}' )
{of   of   of   of   of   of      
Data[I][j]='\0'; of   of   of   of   of   of   of   of      
Break; of   of   of   of   of   of   of   of      
} of   of   of   of   of   of      
Else If((c of   of   of   of   of   of      =='\r') | | (C=='\n') | | (C=='{') )
{of   of   of   of   of   of      
J of   of   of   of   of   of   of   of      - - ;
} of   of   of   of   of   of      
Else of   of   of   of   of   of      
{of   of   of   of   of   of      
Data[I][j]=c; of   of   of   of   of   of   of   of      
} of   of   of   of   of   of      
} of   of   of   of      
} of   of      
    }
    Fclose(fp)
    / / read extraction data to endow with corresponding character variable from inside the file
    PstrZY00 = Data[0];
    PstrZY01 = Data[1];
    PstrZY02 = Data[2];
    PstrZY03 = Data[3];
    PstrZY04 = Data[4];
    PstrZY05 = Data[5];
    PstrZY06 = Data[6];
    PstrZY07 = Data[7];
    PstrZY08 = Data[8];
    / / establish database target
    Cdatabase Db;
    / / confirm data
    of     If(! Strcmp(pstrZY00, NULLSTRING) | | ! Strcmp(pstrZY01, NULLSTRING) | |
        ! Strcmp(pstrZY03, NULLSTRING) | | ! Strcmp(pstrZY05, NULLSTRING) | |
        ! Strcmp(pstrZY06, NULLSTRING) | | ! Strcmp(pstrZY07, NULLSTRING) | |
        ! Strcmp(pstrZY08, NULLSTRING)     )
    {
  of *pCtxt   of   of      %26lt;%26lt;  of *pCtxt   of   of      %26lt;Br%26gt;%26lt;Center%26gt; %26quot;
%26lt; of   of   of   of   of   of      %26lt;"Please Be Certain To Enter Your ZY00, ZY01, ZY03, ZY05, ZY06, ZY07, ZY08. \r\n "
  of   of   of   of   of      %26lt;%26lt;"Thank You. "Thank You..
  of   of   of   of   of      %26lt;%26lt;  of   of   of   of   of      %26lt;/ Center%26gt;%26quot; ;
Return; of   of      
    }
    / / the format changes the requirement that adds a record
    StrQuery.Format("ZY00 = '%-.20s'" , pstrZY00);
    / / open database object,If this object is nonexistent,exit
    If(! Db.Open(ZyDB, / / LpszDSN
FALSE of   of       , / / BExclusive
FALSE of   of       , / / BReadOnly
CONNECTSTRING of   of       , / / LpszConnect
FALSE)) //bUseCursorLib of   of      
    {
*pCtxt of   of      %26lt;%26lt;"Could Not Open The Database. "Could Not Open The Database.. ;
Return; of   of      
    }
    / / found RECOREDSET kind the database expresses an object
    CZyCMT1 RsZy(%26db);
    / / appoint formatted the requirement that adds a record gives a watch the target
    RsZy.m_strFilter = StrQuery;
    / / open watch object,If cannot be opened with respect to CATCH unusual processing
    Try
    {
If(rsZy.Open(Crecordset of   of       : Dynaset) )
{of   of      
  of   of   of       / / if consider additive record already in the watch of consist in database,Give out the feedback information that contains in IDS_ONFILE
If(of   of   of   of       ! RsZy.IsBOF() )
{of   of   of   of      
StrOutput.Format(IDS_ONFILE of   of   of   of   of   of       , pstrZY00, SCRIPTPATH);
} of   of   of   of      
Else of   of   of   of      
{of   of   of   of      
  of   of   of   of   of       / / construction inserts record statement
StringSql.Format("Insert Into CMT1 (ZY00 of   of   of   of   of   of       , ZY01, ZY02, ZY03, ZY04, ZY05, ZY06, ZY06,,
"ZY07 of   of   of   of   of   of   of   of       , ZY08) VALUES('%-.20s' , '%-.50s' , '%s' , '%-.80s' , '%s' , '%s' ,,
"'%-.100s' of   of   of   of   of   of   of   of       , '%-.9s' , '%-.5s' , '%-.2s')" , pstrZY00, pstrZY01,   of   of   of   of   of   of   of       PstrZY02, pstrZY03, pstrZY04, pstrZY05, pstrZY06, pstrZY07, pstrZY08);
  of   of   of   of   of       / / carry out insert a record to command.The feedback information that if give out successfully,contains in IDS_THANKYOU,
  of   of   of   of   of       / / otherwise CATCH unusual processing
Try of   of   of   of   of   of      
{of   of   of   of   of   of      
Db.ExecuteSQL(stringSql); of   of   of   of   of   of   of   of      
StrOutput.Format(IDS_THANKYOU of   of   of   of   of   of   of   of       , pstrZY00, SCRIPTPATH);
} of   of   of   of   of   of      
Catch (CDBException* PEX of   of   of   of   of   of       )
{of   of   of   of   of   of      
TCHAR SzError[1024]; of   of   of   of   of   of   of   of      
If(pEX-%26gt;GetErrorMessage(szError of   of   of   of   of   of   of   of       , sizeof(szError)) )
StrOutput.Format(IDS_EXCEPTION of   of   of   of   of   of   of   of   of   of       , szError, SCRIPTPATH);
Else of   of   of   of   of   of   of   of      
StrOutput.Format(IDS_UNKNOWN of   of   of   of   of   of   of   of   of   of       , SCRIPTPATH);
} of   of   of   of   of   of      
} of   of   of   of      
} of   of      
Else of   of      
  of   of   of       / / if the database expresses an object to cannot be opened,Give out the feedback information that contains in IDS_UNKNOWN
StrOutput.Format(IDS_UNKNOWN of   of   of   of       , SCRIPTPATH);
    }
    Catch(CDBException* PEX)
    {
TCHAR SzError[1024]; of   of      
If(pEX-%26gt;GetErrorMessage(szError of   of       , sizeof(szError)) )
StrOutput.Format(IDS_EXCEPTION of   of   of   of       , szError, SCRIPTPATH);
Else of   of      
StrOutput.Format(IDS_UNKNOWN of   of   of   of       , SCRIPTPATH);
    }
  of   of   of   of     RsZy.Close(); / / close watch boy or girl friend
  of   of   of   of     Db.Close(); / / shut a database
    / / the information that shows feedback to the user
    *pCtxt%26lt;%26lt;StrOutput;
  of   of     EndContent(pCtxt); / / HTML end format
}


   

    makes up the ISAPI with good interpret to move voice to receive library Cheng order repeatedly its buy at / in collection of Scripts eye./ the empty that Scripts is foreword of the Cheng that join each other drafts eye to record.It can have connected WWW to take Wu to provide reason implement will set calm.When how be being installed the first times when WWW,The ISAPI that lacks a province but hold the empty of travel drafts eye to record is / Scripts....

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (three)

3, number is occupied civil case type

    it is in order to fall to in medical number is expressed according to the library add in CMT1 add write down the number of the collection to occupy civil case type:

    ZY00 (in name of the article in medicine) :{three seven}

    ZY01 (in Chinese language spells name of the article in medicine sound (write greatly) ) :{SANQI}

    ZY02 (in the article in medicine fastens a name) :{person is joined three seven,Cropland seven,Dish dragon seven (four plain) ,Gold is not changed (river on the west) }

    ZY03 (in name of medical flower article) :{Sanchi}

    ZY04 (in medical flower article fastens a name) :{}

    ZY05 (in medicine draws fourth name) :{Radix Notoginseng}

    ZY06 (in medical ability only) :{MMH35002A}

    ZY07 (in allusion of medical big decline writes a code) :{00096}

    ZY08 (result effect kind fasten) :{18}

Number is narrated to occupy on     civil in,The photograph that number of the medicine in only the between word accord with of "{" and date of "}" accord with is added to be added expresses CMT1 according to the library should be counted in occupying territory,"The before word accord with of {" is used at giving to make up write number to occupy civil with door grant to be shown at carrying,In foreword of ISAPI Cheng but solid the between word a surname that takes "{" and "}" only now,Ignore before summary "{" carry the accord with that show a word and "{" and accord with of "}" word to wait....

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (two)

2, number is built according to what the library expresses stand

Form of     form changes SQL of character of the language that check ask (Structural Query Language) it is character of language of a kind of when number closing a department ties interconnected system according to the library high level,It is by IBM in ten years of seven acting end the San Jose of public department grinds investigate real test room leaves of hair,Show Si to be made closing department number to provide reason according to the library more is all place collect with,The number closing a department that is known to be versed in for a kind mark of course of study allows surely by accurate bureau of mark of home of beautiful country country investigates ask language character according to the library.It is provided have strong large number is protected according to dimension and investigate ask work can,It is one kind can be versed in the number that using a department interconnected system to go up more is occupied child language character.Its life makes language sentence kind be like at flower language sentence child,With door make be used come ten minutes square, solve easily at manage.It is in order to fall to use Microsoft SQL Server to build the "CMT1" watch that stand to lift exemple:

   

    CREATE TABLE CMT1

    (

    ZY00 Varchar (20) NOT NULL,

    ZY01 Varchar (50) NOT NULL,

    ZY02 Text NULL,

    ZY03 Varchar (80) NOT NULL,

    ZY04 Text NULL,

    ZY05 Varchar (100) NOT NULL,

    ZY06 Varchar (9) NOT NULL,

    ZY07 Varchar (5) NOT NULL,

    ZY08 Varchar (2) NOT NULL

    )...

Benefit shows to be added according to be being added in the library to number with ISAPI fact write down collection (one)

This civil interpose carry on with HTML (Hypertext Makeup Language) organize the aspect that write a group, make up write ISAPI (Internet Server Application Programming Interface) foreword of the Cheng that join each other with solid add to the middle of building the number that stand to occupy a library with Microsoft SQL Server now add remember the square law of the collection.



    1, before character

    Microsoft SQL Server is one kind can be extended shrink, tall sex can closing department number to provide reason according to the library is all (RDBMS) ,It is the type that divide cloth only guest door machine - take Wu implement plan calculate annulus condition and set plan.Its inside buy number is occupied answer make result can, be in charge of manage greatly by force to labour is provided and open the system tying interconnected system that puts type is to written guarantee compose is breath of the letter that send cloth to carry the smooth station that supplied an eminent to jump over.Its inside buy number is occupied answer make result can rectify a group to knit hair of the cent inside machine compose to allow to be in truly letter breath is carried offerred strong big and the square type that can lean,The number in the library is occupied not only but with answer make Microsoft SQL Server count according to the library,Also but with answer make ORACLE, IBM DB2, SYBASE with its its number occupies a library.

    Microsoft SQL Server is with door carry offer inside buy number is occupied answer make result can - - piece foreword of beat shellfish Cheng (Bcp) a change that can occupy a library to be in charge of manage to tie interconnected system in number move number is occupied,Can occupy number from civil beat shellfish arrives in SQL Server.This also is to say to use door can use Bcp with benefit some one article medium number is occupied inside the look is added in adding number to occupy a library.But it is Bcp be but hold travel Cheng foreword,Must make carry in the life surely show symbol (like DOS) travel leaving fortune it,This used a belt to come to Windows extremely big not square;Additional outside the case type that Bcp life makes have its solid is taken have make much ginseng count,With door recall hard at writing down.I people hair in exhibiting benefit to show to occupy a library to number with ISAPI fact, add add remember the square law of the collection.This kind of square law is made up with HTML write with door be defeated civil the bound face of the name,Make order of the Cheng that join each other with ISAPI.ODBC has been connected in ISAPI (Open Database Connectivity) receive repeatedly with library of SQL Server.With door need to be defeated in face of HTML bound only civil renown,Civil medium number is occupied inside look by just add add in pointing to decided watch.This square law gram took what Bcp life makes to lack a feature.This civil interpose carry on show with ISAPI fact to in medical number is occupied add in the library add remember the square law of the collection,Build to what gave number to be expressed according to the library establish square law, number to occupy civil case type, ISAPI advocate foreword wanting Cheng, be defeated by number to occupy civil the HTML article of renown bound face case type....

ASP series lecture (two ten three) write cross platform application process

Process of ASP application is running Windows NT 4.0 or move on Windows 95 and the computer that its replace the operating system of version.Additional,The ASP that can run Streamline version on Macintosh.Because the Personal Web Server on Windows 95 and Macintosh is,release a design for the individual,The supportive field that using to ASP so is a little different.You can go up in the server of Windows NT Workstation or Windows NT Server very the applied program that runs in the individual to release the development on platform conveniently.This theme introduces the different point between each platform.

In the ASP on Macintosh
The ASP of Macintosh edition is in the light of what the individual releases a design,The simple port that offerred ASP scenario.Because of this,Certain the ASP character that has in Windows platform is not supported on Macintosh.Detailed information,Consult please documentation of Macintosh ASP.

The ASP of Macintosh edition offerred the built-in target that cannot achieve automatically on Windows platform.Windows platform has the package that offers these targets;But you must state in the Global.asa file of preexistence application process these objects,Just can make your script need not be revised next can move at Windows platform.

The ASP on Windows 95
Windows 95 or ever since version is to serve as an individual to release what platform designs.Although it supports moving ASP completely to use a program,But individual Web manages implement the more complex government that does not have Web to develop personnel place to need is characteristic,If change script and conversational overtime.

The ASP on Windows NT Workstation
Windows NT Workstation is the complete development platform that supports character of script of all ASP.As acquiescent administrative tool,Individual Web manages implement be the design of Web administrator that is administrator of blame full-time server.It is to the hope for development of process of ASP application and the development staff that server site controls in the round during debugging,Internet serves government implement it is an appropriate administrative tool.Can install Internet to serve government through running the installation program of Personal Web Server implement.

...

ASP series lecture (two ten two) use international site

An advantage that releases an information on Internet or Intranet is you can build an user to never can be the same as a country (area) the site of internationalization Web of the visit.The user can apply for already by the webpage of language of place of this locality melt into,This locality of use browser changes version to read.When the Web site that builds a bag to contain a variety of language webpages,The string that needs to be changed between script of browser and ASP of occasional of Web server and ActiveX component to deliver.For example,If browser of a Japanese sent form or inquiry string in HTTP request,be worth,The character set that this string must use at handling script from the ASP of translate into of Japanese character set of the browser.

The acquiescent character set that if all pages on Web site use Web server,uses is written,So ASP will have transition automatically.But,If the webpage is,write with other character set,How must change string with demonstrate of ASP command.For example,If your site has the webpage of Japanese character set already,The webpage that has Chinese character set again,must the character set that some of processing of demonstrate ASP uses when specific page.

ASP also offerred the order that supports habit of different area culture,Be like money, time and date format.Like changing an order with string,If your script does not have the acquiescent spot of server of use Web,Should use the spot to command.

Setting string changes code page
Code page is an internal list,The operating system uses it the symbol (letter, number and punctuation mark) map is character number.Different code page supports different country (area) uses character set.Code page cites through number,For example,Code page 932 represents Japanese character set,Code page 950 represents traditional Chinese character set.

Active Server Pages and interiorly of engine of ActiveX script use Unicode,This is a kind of 16 the character encode standard of fixed length.If you are written the acquiescent code page that all pages use Web server,Criterion ASP will change string automatically.If your script does not use the acquiescent code page of Web server,Criterion should the code page that demonstrate place uses so that string is delivered between ASP and script engine when can be changed correctly.Additional,The string that you also can think be delivered between browser and component of script occasional ActiveX and script appoints code page.

Should appoint code page for ASP page,Can use CODEPAGE to dictate.For example,Page of setting Japanese code,Can use the following statement:

%26lt;%@ CODEPAGE= 932 %%26gt;
When ASP handles the content of this one page and script,The code page that will use you to appoint will decide how the character in script the Unicode of character set translate into of the script from you.For example,The value that represents alphabetical "a" in ANSI will is by translate into in Unicode the different value that represents alphabetical "a" .

The code page that Active Server Pages assumes the code page of the string that delivers between server and browser occasional script and ActiveX component and you are installed for script is identical.If want to appoint different code page,Can install Session.CodePage attribute,Enclothe CODEPAGE to install thereby.For example,You use JIS to write script,But the client program that answers use UTF-8,(two kinds of JIS and UTF-8 are standard Japanese character set different character code) .

The value that Session.CodePage acquiescent setting dictates for CODEPAGE;Will enclothe current CODEPAGE to install to the setting of this attribute.For example,Want code page instead traditional Chinese,Can use following orders:

%26lt;% Session.CodePage = 950 %%26gt;
If you are the code page that changes partial script temporarily only,Original value must be Session.CodePage setting after this.The following script shows how to change code page temporarily:

%26lt; ! - - Welcome To My Home Page In Japanese, code Page 932- - ! %26gt;
%26lt;%@ CodePage = 932 %%26gt;
. . .
%26lt;% Session(%26quot;OriginalCodePage%26quot; ) = Session.CodePage %%26gt;
%26lt; ! - - Look Up Name In Chinese, code Page 950- - ! %26gt;
%26lt;% Session.CodePage = 950 %%26gt;
%26lt;% Sender = ReadMailHeader(%26quot;Sender%26quot; ) %%26gt;
%26lt;% Found = FindFriend(%26quot;Sender%26quot; ) %%26gt;
%26lt; ! - - Restore The Original Code Page- - ! %26gt;
%26lt;% Session.CodePage = Session(%26quot;OriginalCodePage%26quot; ) %%26gt;
%26lt;% If Found==TRUE
ReplyWithPersonalizedForm()
Else
ReplyWithBusinessForm()
%%26gt;
Setting spot marks
The spot is the information of option of a group of user head related to user language.The spot decides how the format turns date and time, project;How to press a letter sort and how to compare string.The spot marks (the 32 digit that LCID) is only definition spot is worth.If you do not have promising script to appoint different spot,So the acquiescent site that ASP will use Web server.

Should install the spot to mark for ASP page,Can use LCID to dictate.For example,Should set Japanese scene,Can use following spot ID:

%26lt;%@ LCID = 1041 %%26gt;
The spot that LCID instruction tells ASP to the book writes script place to use.If want to change the input of script or output spot,Can use Session.LCID property.For example,Should be spot setting standard French,Can use following orders:

%26lt;% Session.LCID = 1036 %%26gt;
The setting that the acquiescent setting of Session.LCID dictates for LCID.The value that sets Session.LCID in script will enclothe acquiescent setting.

...
« 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »