lt;%Set Dbconnection=server.createobject ("ADODB. CONNECTION ")DBPath = Server.MapPath ("Customer.mdb")DbConnection. Open "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath Establish a connection with the database, with the same. Sql= "SELECT
The documents are as follows:
Dim Vis
Set Js=createobject ("Scripting.FileSystemObject")
Set F=js.createtextfile ("D:/count.txt", True)
F.writeline 0
F.close
Whichfile=js.getfile ("D:/count.txt")
Set Thisfile=js.opentextfile (Whichfile)
Vis=thisfile.
Dim Voteid, Mychoose, I, Rs, SQLIf not IsObject (Conn) Then connectiondatabaseVoteid = CLng (Request ("Voteid"))If request.cookies ("Vote_" &voteid) = "Newaspvote_" &voteid ThenResponse.Write ("&back= has participated in the vote, thank
The code is as follows
Copy Code
Dim Voteid, Choose, Nowid, I, rs,sqlIf not IsObject (Conn) Then connectiondatabase If IsNumeric (Request ("Voteid")) ThenVoteid = CLng (Request ("Voteid"))ElseVoteid = 0End IfIf Voteid = 0 ThenSQL = "
"Pass form" objects submitted by a form G
' ET
If request.querystring.count>0 Then
Qstr= "?"
For each x in Request.QueryString
Qstr = qstr & x & "=" ' Write Name of Parameter
Qstr = qstr & Server.URLEncode (Request. QueryString (x)) & "&" ' Write
1. Declaration of simple variables2. Declaration of an array variable3. Assignment of variables4. Scope and lifetime of variablesInstance:Example8.aspX=1Call setprocedurevariable ' calls the setprocedurevariable processResponse.Write X ' Displays
ANSI local coding, are defined by the countries themselves, there is no fixed file header format, in the mainland Chinese operating system, is readable gb2312, in other language system, is garbled, so this part does not need to distinguish in detail.
DirectoryFirst, the Environment configurationThe basic operation of ASP to ExcelASP operation Excel to generate datasheetIv. ASP operation Excel generates chart diagramFive, server-side Excel file browsing, downloading, deletion schemeVI. Appendix
Dim Filename,fso,fout
If Request.Form ("asp2html") <> "" Then
Filename= "Htmer.html"
Set fso=server.createobject ("Scripting.FileSystemObject")
Set Fout=fso.createtextfile (Server.MapPath (Filename))
Fout.write Request.Form ("asp2html")
(Author: Green Apple studio compiled)
Summary of rules
Now let's review the rules:
* Avoid including adovbs.inc files and use constants in other ways.
* When a single Recordset is used, the connection string is passed to the ActiveConnection
What type of cursor and record locking methods are most efficient?
All of the tests so far have used only "forward only" Grand to access the recordset. ADO provides more than three types of cursors for recordsets: Statically scrollable cursors,
1 Connection
1.1 Pooling
In the Web application, there are often many users at the same time access to the database, and the ASP is the scope of the object is page level, that is, each page to join and disconnect the database, will it be very slow?
What type of cursor and record locking methods are most efficient?
All of the tests so far have used only "forward only" Grand to access the recordset. ADO provides more than three types of cursors for recordsets: Statically scrollable cursors,
Third, the first Test
In the first test, we simulated a typical scenario found in the Microsoft ASP ADO sample to extract a Recordset. In this example (ado__01.asp), we first open a connection and then create the Recordset object. Of course, the
, ASP dynamically generated content in what way to output the highest efficiency?
Author: Cactus Studios This article hits: 123
Generating dynamic content on the server is one of the main reasons to use ASP, so the first test project we choose is to
Set Fso=server.createobject ("Scripting.FileSystemObject")Set F = Fso.getfolder (SPP)Set FC = F.subfoldersI=1I2=1For each F in fc%> Folders .gif" width= height=10>If I2I2=i2+1ElseI2=1End IfNext
function to process file size
Sub Showspaceinfo (
Q: Why does my RecordCount always return-1?A: You should use this mode to open the record set for database access:Rs. open strSQL, conn, 1, 1StrSQL is the SQL statement used to operate the database, and conn is the Connection variable used to
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