1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Database connection Difficulties

Discussion in 'MS Access' started by MastaKay, Jun 6, 2007.

  1. MastaKay

    MastaKay New Member


    I have a MS Access database called TelephoneList, that has a table called Characters.Now, I have a webpage with a dropdownlistbox preloaded with characters(A-Z).When I select a character, I want the page to extract values from the page using that character to filter the values.(i.e. Select select name, surname from Character where FilterByChar = Dropdownlist.SelectedItem).

    First.How do I establish a connection, command, and datareader to allow me to do this.

    A sample code would be very nice thank you.

    My current one is****
    set conn=Server.CreateObject("ADODB.Connection")
    set rs = Server.CreateObject("ADODB.recordset")
    sql="SELECT Name, Surname, Department, Xtension, [Other Extension] FROM Characters where Xtension = "****Dont knw how to do the where statement
    rs.Open sql, conn
    <table border="1" width="100%">
    <%for each x in rs.Fields
        response.write("<th>" & x.name & "</th>")
    <%do until rs.EOF%>
        <%for each x in rs.Fields%>
    Last edited by a moderator: Jun 6, 2007

Share This Page