Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Update Access database through Combo-Box in ASP page

Hi,
How can I create a combo box in an ASP page that based on a query/table?
I'd like the combo-box will contain ID and Description of list of values, so the user will see the description but after update the Database will be updated with the ID of the item that chosen by the user.

Thanks
Ronna

Comments

  • alexzhenalexzhen Member Posts: 13
    : Hi,
    : How can I create a combo box in an ASP page that based on a query/table?
    : I'd like the combo-box will contain ID and Description of list of values, so the user will see the description but after update the Database will be updated with the ID of the item that chosen by the user.
    :
    : Thanks
    : Ronna
    :
    :

    hi, you can do this;
    <%
    Set cnn = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    rs.CursorType =1
    rs.CursorLocation =2
    rs.LockType=1
    rs.ActiveConnection = cnn

    'add some code to update the database, try to use Request.Forms

    rs.Source = "select * from " & table_name
    rs.Open()
    %>

    While NOT rs.EOF
    Response.write "" & rs.Fields("DESCRIPTION") & ""
    rs.MoveNext()
    Wend
    rs.Close()
    Set rs = Nothing
    cnn.Close()
    Set cnn = Nothing
    %>

  • Andre YoungAndre Young USAMember Posts: 0

    ______ ( http://forcoder.org ) free ebooks and video tutorials about / Assembly Python MATLAB PHP PL/SQL Swift R Java Go JavaScript Objective-C Delphi C# Perl Scratch C Ruby C++ Visual Basic .NET Visual Basic COBOL Lua Rust LabVIEW Erlang SAS Clojure ABAP D Dart Kotlin Logo Awk Alice Hack Apex Transact-SQL Scheme Fortran Prolog F# Julia Bash Lisp Crystal ML Ada Scala VBScript FoxPro / ___________

Sign In or Register to comment.