Super-simple flash asp access Counter
Related Tags:
Although the counter does not necessarily use the database, but I really counter this very, very simple
Guoy_8186 is subject to the most inspired, he will vote Guide really very good.
Flash code:
Var count = new LoadVars (); / / create an object loadVarsCount.load ( "Your Path / write.asp", count); / / asp document reader
Count.onLoad = function (success) (
If (success) (
= Count.total visits;
) / / Determine whether the above is finished reading, after the completion of the variables to read scenes in the variable
); Asp code:
<%
Dim rs
Dim sql
Dim conn 'definition of variables
Set rs = server.createobject ( "adodb.recordset") 'to create data sets targets
Conn = "DBQ =" server.mappath ( "counter.mdb") "; DefaultDir =; DRIVER = (Microsoft Access Driver (*. mdb));" 'database connection statement, the default is the root directory of your space, if the database document folder path ahead to add to
Sql = "update count set num = num 1 where id = 1" 'to the num this value plus a phrase
Rs.open sql, conn, 1,1 'implementation of write
Sql2 = "select * from count where id = 1" 'read the statement
Rs.open sql2, conn, 1,1 'implementation of reading
If not rs.eof then
Total = rs ( "num") 'the value of the database to a variable
Response.write "& total =" total & & "&" 'data can be read into the form of flash
Else
End if
Set rs = nothing
Set conn = nothing
%>
Use database access, building a database called counter, inside the building of a new table called count, table inside only need to create two fields, one called id, type automatic election code, the main button settings; Another called num, type figures , the data storage field is the place.
This OK! Each subsequent flash open this document in the database will be increased by 1, to read because there is a flash variables, you can deal with it as it pleases. Attached to the source code download: Click here to download the source files
- All commonly used language reference manual for manual HTML | CSS manuals | JScript Manual | VbScript Manual | ASP Manual | PHP Manual | SQL manual | Site effects | ADO Manual
- Use Dreamweaver ASP paging technology to achieve the reference
- Imitation PHP Pagination written ASP
- WAP technology in the ASP V.
- Using ASP + CSS Random background
- Flash asp xml messages this tutorial
- Flash in the use of ASP technology
- Dreamweaver ASP produced two dynamic menu
- Flash and the integration of database applications Asp
- HTML pages of the parameters to achieve (similar to ASP)
- FrontPage to create HTML / ASP pages mixed
- FLASH database applications with ASP
- HTML pages to accept the same parameters as the asp
- PHP and ASP call in Dreamweaver 8 IE preview
- DHTML ASP + + XML + CSS = directory tree
- WAP technology in the ASP 6
- Asp and simple AJAX applications
- Flash and ASP communications experiment
- Multifunctional only provide a SQL statement can be printed, CSS page-function control of the ASP
- Using ASP + CSS realize website random background




