HOME
DOMAIN
WEB HOST
AUTO Site
VPS SERVER
CLOUD HOST
SERVER
HK HOST
AGENT
SERVICE
<!-- #include file="Header.asp" --><!-- #include file="Footer.asp" --><SCRIPT language="vbscript" runat="server">Sub Main() WriteHeader WriteBody WriteFooter End Sub Sub WriteBody() ...End SubMain?'调用过程Main </SCRIPT>
<% '检查客户端是否仍在连接If Not Response.IsClientConnected Then '仍然连接着,处理程序Else '断开End If%>
<HTML><BODY><%Set MyConn = Server.CreateObject("ADODB.Connection")MdbFilePath = Server.MapPath("sample.mdb")MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"SQL_query = "SELECT * FROM Friends"Set RS = MyConn.Execute(SQL_query)WHILE NOT RS.EOF%><LI><%=RS("Name")%>: <A HREF="">Homepage</A><%RS.MoveNextWEND%></BODY></HTML>
<%If Not Session("DBOpen") Then%><H1>Database not connected</H1><%Else%><H1>Database open</H1><%End If%>
<%If not Session ("DBOpen") ThenResponse.Write "<H1>Database not connected</H1>"ElseResponse.Write "<H1>Database open</H1>"End If%>
SELECT count(*) FROM publishers WHERE state='NY'
SELECT count(city),city FROM publishers GROUP BY city
SELECT * FROM TableName WHERE FieldName>50 OR FieldName<100 ORDER BY FieldName2, Field Name3
strConnString = "DSN='';DRIVER={SQL SERVER};" & _ "UID=myuid;PWD=mypwd;" & _ "DATABASE=MyDb;SERVER=MyServer;"
strConnString ="Provider=SQLOLEDB.1;Password=mypassword;" & _ "Persist Security Info=True;User ID=myuid;" & _ "Initial Catalog=mydbname;" & _ "Data Source=myserver;Connect Timeout=15"
<SCRIPT LANGUAGE="VBScript"><!--Sub btnEnter_OnClickDim TheFormSet TheForm = Document.MyFormIf IsNumeric(TheForm.Age.Value) ThenTheForm.submitElseMsgbox "Please enter a numerical age."End ifEnd Sub//--></SCRIPT><FORMmethod="POST" name=MyFormaction="myfile.asp">? Name: <INPUT typr="text" name="Name">Age: <INPUT type="text" name="Age"><INPUT type="button" name="btnEnter"value="Enter"></FORM>
<%=MyAds.GetAdvertisement("CustomerAds.txt") %>