Results 1 to 5 of 5

Thread: [RESOLVED] Using Classic ASP to update a database

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    7

    Resolved [RESOLVED] Using Classic ASP to update a database

    Hi

    I'm relatively new to writing classic ASP, and have managed to so far to get by with code borrowed from other projects I've inherited.

    I'm in the process of trying to build a system that will allow users to retrieve information from a database, review it and where necessary update it.

    So far, I've created a form which issues a request to SQL to execute a stored procedure before reading the returned values into an array and then displaying them in a friendly format.

    My plan is to have a text field on-screen for every piece of information being displayed. The idea is that if the user wanted to update a piece of information, they would put that new information into the text field that corresponds to the field they wish to change. Once all changes have been keyed in, they would then click a button which would reload the form - a flag would be passed through to instruct the form to execute a stored procedure to perform the update.

    Everything is going fine up to the point where I try to retrieve the information from the text boxes. I can't figure out a way to get the values from the text boxes into the URL that would be fired when the button is clicked.

    If it's of any use, the button in question would ideally be a graphic rather than a traditional button.

    Any and all help greatly appreciated.

  2. #2
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,137

    Re: Using Classic ASP to update a database

    Set the method on your form to post instead of get and then use request.form instead of request.querystring to get the entered values when you submit the form.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    7

    Re: Using Classic ASP to update a database

    Thanks very much for your help Mark. I really AM a know-nothing when it comes to ASP - I'm pretty handy with SQL but ASP is a whole new ballgame.

    With a combination of your comment (which drove me in the right direction) and the information found at http://www.w3schools.com/asp/coll_form.asp which gave me sample code to actually do the job, I've now been able to get the page going.

    Many thanks once again.

  4. #4
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,137

    Re: [RESOLVED] Using Classic ASP to update a database

    You probably learned my by digging up the solution on your own but in the future if you post the code that you are trying to get working you will often get a much better and more precise answer.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    7

    Thumbs up Re: [RESOLVED] Using Classic ASP to update a database

    Hi Mark

    Under normal circumstances I would have posted the code, but the problem was that I'd written a bucketload of code that I thought would help me. In my enthusiasm/frustration, there's a good chance that about 90% of the code would have been both meaningless and useless, and would therefore have done nothing more than bore the reader.

    Again, many thanks for your prompt assistance.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width