How do I update SQL database using forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use one ASP page to retrieve a record and display the results.
The user can then change the fields and click submit which should update the
database. The submit calls another asp page that contains the update SQL. If
I hard code values the update works. I can't seem to be able to retrieve the
form field values from the first asp.
 
Based upon the information you have provided, I can tell you that you've
done something wrong. That's ALL I can tell you based upon the information
you have provided. Would you care to provide more?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Thanks for your response. Yes I do want to provide more information. I am not
sure just how to do that in the quickes way. I will outline the steps I went
through to create the 2 ASP pages. By the way this use to work until I
upgraded my environment.

1. I create a new blank page with extension .asp(myForm.ASP)

2. Insert database results. Select exisiting database connection, select a
table provide criteria that will select only one record, format output to a
list using text fields. Modify form properties to send other and under
advanced give it the name of my second asp page (myUpdate.asp)

3. I create my second new blank page (myUpdate.asp)

4. insert database results. select existing database connection, select
custom query and enter in my update sql. Now if I hard code values for the
update instead of using variables the update works. my sql statment looks
something like this;
Update Games
set
Win_Lose = ::Win_Lose::
where
Game_ID = ::Game_ID::

the variable names ::Win_Lose:: are from the first page and match the form
field names. I have tried changing names, enclosing character fields in
quotes, updating only numeric fields etc. the games table is keyed on Game_ID.

the error I got was not real descriptive and what do you know now it
actually works?
So thanks for the help but just sitting down and doing each step again as I
composed this email has the update working just fine.

Thanks for your time...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top