Recommended: Interpreting the complete list of common error types of ASP ActiveServerPages, ASP0126(0x80004005)-Include file cannot be found Microsoft OLEDBProviderforODBCDrivers(0x80040E21)--An error occurred in the sql statement (data type mismatch or table name (field name) error or table is in edit state, or table does not exist in a database opened by conn) Microsoft OLEDBProviderforODBCDrivers(0x800
<%
'=============================================================================
'Function Navigation
'FormatDate(DT,tp) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'IsInteger(para) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'ChkrequestDate(Para) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'ChkPost() ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'IsValidEmail(email)--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'MakedownName()-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'getIP() -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'LeftTrue(str,n)---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'CheckSql() - For system security, add SQL injection immunity directly where there is a database connection
'Runtime()---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Checkfolder(folderpath)---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Deletefolder(folderpath) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Filehaveno(FileName) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'readfilerecord(Filename) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'WriteString(String,FileName)------------------------------Write the specified string to the specified new file
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'Encrypt(theNumber)| Decrypt(theNumber) A set of functions that encrypt and decrypt IDs, up to 8 bits
'UTF2GB(UTFStr) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'toUTF8(szInput)--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'c10to2(x)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'c16to2(x)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'c2to16(x)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'c2to10(x)-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'==============================================================================
%>
<%
StartTime=timer()
'Date formatting
Function FormatDate(DT,tp)
dim Y,M,D
Y=Year(DT)
M=month(DT)
D=Day(DT)
if M<10 then M=0&M
if D<10 then D=0&D
select case tp
case 1 FormatDate=Y&Y&M&M&M&D&D
case 2 FormatDate=Y&/&M&/&D
case 3 FormatDate=M&/&D
case 4 FormatDate=Y&/&M&/&D
case 5 FormatDate=Y&-&M&-&D
end select
End Function
'--------------------------------
' ---Judge whether the data is integer-----------------------------------------
Function IsInteger(para)
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)= then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>9 or mid(str,i,1)<0 then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
End Function
'--------------------------------
'Detection whether the passed parameter is date type
Function ChkrequestDate(Para)
ChkrequestDate=False
If Not (IsNull(Para) Or Trim(Para)= Or Not IsDate(Para)) Then
ChkrequestDate=True
End If
End Function
'--------------------------------
Share: ASP implements the code for manual paged long articles % setrecordset1=server.createobject(adodb.recordset) exec=SELECT*FROMnewswhereid=id recordset1.Openexec,conn,1,1 % tablewidth=85%border=0align=centercellpadding=3cellspacing=0 trtd ..... % IfRequest(page)=Then pageNum=0
6 pages in total Previous page 123456Next page