Search Calls | All Unresolved Calls | List All Calls | Statistics | Home

<% Dim n, c, conn, rs, sql, database, table, field ' Call results of Field "Situation" in table "Friends" in database "People.mdb" Call TrackField("db/Ticker.mdb", "calllog", "CLProblemCat") Sub TrackField(database,table,field) sql = "select " & field & " from " & table & " order by " & field OpenRS(database) c = 0 t = 0 ReDim A(1) ReDim V(1) while not rs.eof if rs(field) <> A(c) then c = c + 1 ReDim Preserve A(c), V(c) A(c) = rs(field) V(c) = 1 else V(c) = V(c) + 1 end if t = t + 1 rs.moveNext wend CloseRS() if t > 0 then response.write "

" for n = 1 to c if color="#f0f0f0" then color="#e5e5e5" else color="#f0f0f0" response.write "" response.write "" barra = round((V(n)/t)*100,2) response.write "" response.write "" response.write "" next response.write "
  " & A(n) & "  " & V(n) & "  " & barra & "% " if barra > 0 then response.write "" else response.write "-" end if response.write "




Total: " & t & " " else response.write "

    No records.

" end if End Sub Function OpenDB(database) Set conn = server.createobject("adodb.connection") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(database) & ";" End Function Function CloseDB() conn.Close Set conn = nothing End Function Function OpenRS(database) OpenDB(database) set rs = conn.execute(sql) End Function Function CloseRS() set rs = nothing CloseDB() End Function %>




Submit Call Search Calls Export Calls Home/Submit Call