Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    May 2005
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Binding Combo Box to Database

    Hi, folks. I am still trying to figure out how to manipulate my asp page so that it is possible for the viewer to click on a combo box, make one of three choices, and then have that value write to the database located on our SQL server. I can get the database to display just fine, but I am now having trouble binding the combo box and its three choices to the record. I need that to happen so that subsequently when the page is accessed, the latest value is displayed. If anyone can give me any direction, it would be most appreciated!! Thanks. Penni

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Binding Combo Box to Database

    Hi there

    As per your previous question and the workings of the ASP it appears you have mastered the Select Statement to retrieve data and display it, now you must use the Insert statement.

    Without knowing the schema of your database, if it is in fact an Access database or a SQL database and structure of your site I think it best if you reference w3schools to start to obtain the syntax for the works you need to do.

    Just note that if there are any constraints to the database table you are updating you add data to required fields
    Jerry

  3. #3
    Star Lounger
    Join Date
    May 2005
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding Combo Box to Database

    Thanks so very much. It looks like I will be able to use the ADO Update information because the table is not actually having a record added, but having three fields updated. The link that you supplied is my first real solution!!!!! I have been really disheartened to this point. Thanks again! Penni

  4. #4
    Star Lounger
    Join Date
    May 2005
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding Combo Box to Database

    Hi, Hans. I received your message about message duplication from my previous post. These posts appear to be the same, but are not. Yes, I am working the same problem, but in my second post (this one) I tried to break down the problem to getting just one thing working, that is, getting the combo box/list menu to bind to its database column. If you view my original post, you will see that there are a plethera of questions contained there. I should have started out with just this one thing and then once solved, gone on to the next thing. [img]/forums/images/smilies/ohmy.gif[/img](

    Thanks. Penni

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Binding Combo Box to Database

    Hi Penni

    I am glad it is something you can work on. I have found that when working in the Lounge it is best to ask questions in "bite size" chunks instead of a great wedge of questions. This probably why you didn't get such a fast response in the first question <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Now back to this bitesize <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    You do not have to bind the field in the ASP page like you do in an Access database form to table or query. You just need to create the code in the ASP page

    I was going to write it for you and then I remembered this nice little tutorial:

    http://www.drdev.net/article01.htm
    Jerry

  6. #6
    Star Lounger
    Join Date
    May 2005
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding Combo Box to Database

    Thanks! That looks very promising. I am going to take a break from all of this, step away for a bit, and then come back. I only have a few more days to work on this as I am leaving my position and moving to England. That is why I am experiencing a sense of urgency about this project. I really want it done before I go. I have to say that my original, long-winded post has never been responded to. Lesson learned! Thanks. Penni

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Binding Combo Box to Database

    I apologize if I was a bit too hasty.

    However, as Jezza noted, it's best to ask one question at a time, so I would suggest that you post the other questions one by one, either as follow-up questions in this thread, or if they are independent from this one, in a new thread.

  8. #8
    Star Lounger
    Join Date
    May 2005
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Binding Combo Box to Database

    Not a problem, Hans. You have always been the best when it comes to my posts!! In this case, Jezza has put me on the right track, so for now I will just continue to sort the problem out with what I have so far. Thanks for all of your help! Penni

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •