Jump to content

degsy

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by degsy

  1. If is a table cell value in HTML then you would probably have to extract it's value using javascript and set it as the value of a hidden form field.When the form is submitted you can take the data from the hidden field.

  2. I usually use something similar to this

    conn_name = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\path\database.mdb")

    Then to connect in your script

    Set rs = Server.CreateObject("ADODB.Recordset")rs.ActiveConnection = conn_name

    e.g.

    <%Set rs = Server.CreateObject("ADODB.Recordset")rs.ActiveConnection = conn_namers.Source = "SELECT TOP 10 user_id, username  FROM [USER]  ORDER BY user_id DESC"rs.CursorType = 0rs.CursorLocation = 2rs.LockType = 1rs.Open()%>
    
    
    						
  3. Usually you would go with the SQL that Skemcin has posted and use a loop to iterate through the recordse.g. if you has two fields called user_id and username in a table called USER

    Set rs = Server.CreateObject("ADODB.recordset")dataSQL = "SELECT TOP 10 user_id, username  FROM [USER]  ORDER BY user_id DESC"rs.Open dataSQL, conn

    <table border="1" cellpadding="0" cellspacing="2">  <tr>    <td>user_id</td>    <td>username</td>  </tr>  <% While NOT rs.EOF%>  <tr>    <td><%=rs("user_id")%></td>    <td><%=rs("username")%></td>  </tr>  <%   rs.MoveNext()Wend%></table>

×
×
  • Create New...