Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Help me! Counter

    I use Dreamweaver for created asp page.i'm test alredy.It no error.But can't
    update recordset
    Please he me.
    or you can download code here >>> [url]http://www.genzapeach.com/shopping.rar[/url]


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="874"%>
    <!--#include file="Connections/conn_shopping.asp" -->
    <%
    Dim rsCounter
    Dim rsCounter_numRows

    Set rsCounter = Server.CreateObject("ADODB.Recordset")
    rsCounter.ActiveConnection = MM_conn_shopping_STRING
    rsCounter.Source = "SELECT * FROM countonline"
    rsCounter.CursorType = 0
    rsCounter.CursorLocation = 2
    rsCounter.LockType = 1
    rsCounter.Open()

    rsCounter_numRows = 0
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-874">
    </head>

    <body>
    <p>
    <%
    counter = rsCounter("count_num")
    if Session("visitor") = " " Then
    counter = counter + 1
    rsCounter("count_num") = counter
    rsCounter.Update
    Session("Visitor") = counter
    Session.Timeout = 1
    End if
    %>
    </p>
    <%
    Response.Write counter
    %>
    </body>
    </html>
    <%
    rsCounter.Close()
    Set rsCounter = Nothing
    %>

    Chanond Guest

  2. Similar Questions and Discussions

    1. RFC: DBIx::Counter - persistent counter class
      Hi, I've been a CPAN consumer for so long, I thought it's about time to start contributing. I wrote a little module that does exactly the same as...
    2. Free Network Tools - Random Password Generator - Link Counter - Hit Counter
      Free Network Tools - Random Password Generator - Link Counter - Hit Counter http://www.sharewareisland.com/onlinetools.asp
    3. hit counter or page counter
      Hi, I need to have a page counter to see how many people access my website. How can this be done? In FrontPage, it's called hit counter. Thanks.
    4. hit counter
      How can I add a hit counter to my web site created in Publisher?
    5. how do I add a hit counter?
      I have published a website using MS Publisher 200, and I can't figure out how to pu t asimple hit counter on my home page....I don't want to...
  3. #2

    Default Re: Help me! Counter

    You only have a select statement on the code page. You also need an update
    statement to process the changes you have made.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Chanond" <webforumsuser@macromedia.com> wrote in message
    news:d2s35n$1a$1@forums.macromedia.com...
    > I use Dreamweaver for created asp page.i'm test alredy.It no error.But
    can't
    > update recordset
    > Please he me.
    > or you can download code here >>> [url]http://www.genzapeach.com/shopping.rar[/url]
    >
    >
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="874"%>
    > <!--#include file="Connections/conn_shopping.asp" -->
    > <%
    > Dim rsCounter
    > Dim rsCounter_numRows
    >
    > Set rsCounter = Server.CreateObject("ADODB.Recordset")
    > rsCounter.ActiveConnection = MM_conn_shopping_STRING
    > rsCounter.Source = "SELECT * FROM countonline"
    > rsCounter.CursorType = 0
    > rsCounter.CursorLocation = 2
    > rsCounter.LockType = 1
    > rsCounter.Open()
    >
    > rsCounter_numRows = 0
    > %>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <title>Untitled Document</title>
    > <meta http-equiv="Content-Type" content="text/html; charset=windows-874">
    > </head>
    >
    > <body>
    > <p>
    > <%
    > counter = rsCounter("count_num")
    > if Session("visitor") = " " Then
    > counter = counter + 1
    > rsCounter("count_num") = counter
    > rsCounter.Update
    > Session("Visitor") = counter
    > Session.Timeout = 1
    > End if
    > %>
    > </p>
    > <%
    > Response.Write counter
    > %>
    > </body>
    > </html>
    > <%
    > rsCounter.Close()
    > Set rsCounter = Nothing
    > %>
    >

    Paul Whitham TMM Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139