Announcement

Collapse
No announcement yet.

Displaying database entries in a web page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Displaying database entries in a web page

    I am pretty much at a brick wall where this is concerned. I have looked pretty thoroughly at Doo_Logs.asp but it is way beyond my current capabilities to glean anything from that.

    What I am trying to do is pull data from three fields: time, name, number, and display the last 'x' number of calls, from most recent to oldest.

    Anyone have any hints as to where I should start?

    #2
    Give this little code a try
    <pre class="ip-ubbcode-code-pre">
    &lt;%@ Language=VBScript %&gt;
    &lt;HTML&gt;
    &lt;HEAD&gt;
    &lt;META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"&gt;
    &lt;/HEAD&gt;
    &lt;BODY&gt;
    &lt;%
    set objConn = CreateObject("adodb.connection")
    objConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=D:\your.mdb"

    objConn.Open

    set objRS_data=Createobject("ADODB.recordset")


    ' [Temperatures] is the name of the table you want to extract from
    ' [Name] is the column name
    ' Order by ASC or DESC

    objRS_data.open "Select [YourTableName].[Name], [YourTableName].[Time], [YourTableName].[Number] FROM Temperatures ORDER BY [YourTableName].[Time]ASC;", objConn


    for I = 1 to howmany
    Response.Write objRS_data("Name") & " " & objRS_data("Number") & " " & objRS_data("Time")& "&lt;br&gt;"
    objRS_data.MoveNext
    next

    %&gt;
    &lt;/BODY&gt;
    &lt;/HTML&gt;

    </pre>

    -Rupp

    Hum ... Why is the third hand on a watch called a second hand?
    -Rupp
    sigpic

    Comment

    Working...
    X