An improved ASP-generated class for SQL command strings

〈% Class SqlString '************************************ ' Variable definition '************************************ ' sTableName----table name ' isqltype----SQL statement type: 0-Add, 1-update, 2-delete, 3-query ' Swhere----conditions '

ASP connection database of the almighty Code

' Solve the problem of Access database path! ' Use dbtype=0 or dbtype=1 to differentiate between the AC library and the MSSQL Library "The specific use of the AC library should pay attention to matters, please see the program description ------------

ASP passes parameters to SQL statements (not stored procedures)

A content management system written four years ago, applied to the company intranet, yesterday the DBA said that the SQL statements were not using parameterized calls, resulting in heavier server burdens and large resource consumption. It also lists

Use regular expressions to implement pattern Picture News (enhanced). Asp

Customer requirements to save the original IMG already in the attribute, depressed, continue to change The code is as follows: function Shownew (content,ntype) Shownew = "" if (ntype = 1) Then Shownew = shownew & "" Shownew = shownew & "" Shownew =

Asp detection file encoding

Function checkcode (path)Set objstream = server. createobject ("adodb. stream ")Objstream. Type = 1Objstream. mode = 3Objstream. openObjstream. Position = 0Objstream. loadfromfile pathBintou = objstream. read (2)If AscB (MidB (bintou, 1, 1) = & HEF

Asp watermarks images

For Each FormName In Upload. UploadFilesSet File = Upload. UploadFiles (FormName)SaveFilePath = sFilePath & File. FileNameF_FileName = FilePath & File. FileName'Create a preview and a watermark imageIf Upload. PreviewType <> 999 and File. FileType =

Asp implements file download

 Asp implements the file download function to download files directly without being opened by IE. Any files can be downloaded. Download files without IE File = Request ("file ")Call downloadFile (replace (file ,"",""),"/",""))  Function

Asp

 Asp Gets the image in the content. This is a piece of code I commonly use. I use regular expressions to get the image address in the content of the article.Function getphoto (strHTML, key)Dim objRegExp, Match, MatchesSet objRegExp = New

Asp article paging code

'*************************************** *************'Function name: StrLen'Usage: get the string length (2 Chinese characters)'Parameter: str ---- string content'Return value: string length'***************************************

ASP method for generating static web pages

Generating static pages from existing ASP pages will save a lot.In the following example, www.111cn.net/index.asp? Id = 1/index. asp? Id = 2/index. asp? Id = 3/these three dynamic pages do not generate ndex1.htm,index2.htm,index3.htm exists in the

Asp generates word files

generate a Word document generate a Word document

Asp achieves level-2 linkage menu

Level 1 classification select Set rs = server. CreateObject ("adodb. recordset ")SQL = "select * from caiwu_cd where ssdl = 0"Rs. open SQL, conn, 1, 1Do while not rs. eof%>"> Rs. movenextLoopRs. closeSet rs = nothing%>Level 2 classification select

Cascade menu [ajax + asp]

Dim conn, rsDim connstrDim sqlCmd'Create a database connection object and openSet conn = server. createobject ("adodb. connection ")Connstr = "Provider = Microsoft. jet. oledb.4.0; data source =" & server. mappath ("data. mdb ")Conn. open

Bind different domain names to different asp subdirectories

First, your VM must support binding multiple domain namesNext, put a piece of code in index. asp to determine the domain name and switch to the subdirectory.Dim StrDomainStrDomain = Request. ServerVariables ("SERVER_NAME ")'Get the string containing

A function used by ASP to display the remaining disk space

This is a function for ASP to display the remaining disk space. You can use it directly if you need it.Function ShowFreeSpace (drvPath)Dim fso, d, sSet fso = CreateObject ("Scripting. FileSystemObject ")Set d = fso. GetDrive (fso. GetDriveName

Asp Image Collection code

To determine whether an image exists,Determine whether a remote image exists by using XMLHTTP. status.Function CheckURL (byval A_strUrl)Set XMLHTTP = Server. CreateObject ("Microsoft. XMLHTTP ")XMLHTTP. open "HEAD", A_strUrl, falseXMLHTTP. send

ASP: remove hyperconnections from strings

11111 2222 3333 44444 The expected result is: 11111 2222 3333 4444 Function regExReplace (sSource, patrn, replStr)Dim regEx, str1Str1 = sSourceSet regEx = New RegExpRegEx. Pattern = patrnRegEx. IgnoreCase = TrueRegEx. Global =

Filter user input in ASP to improve security

Security is very important for all applications. A mistake in a simple application may result in unauthorized access to databases or other enterprise resources. Therefore, security is particularly important. A common attack method is to embed

Random string-asp instance

chr

The 13-digit random string generated by this instance is:RJNVy1gcnE7F7Source code:Generate random stringFunction gen_key (digits)'Define and initialize the arrayDim char_array (80)'Initialize the numberFor I = 0 To 9Char_array (I) = CStr

Test WEB server-asp instance

Script engineJScriptBuild8513Main version5Minor version6Source code: test the WEB server

Total Pages: 1800 1 .... 1448 1449 1450 1451 1452 .... 1800 Go to: GO

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.