Frontpage UPDATE

D

Darren

I have created a few pages that will update and edit my
SQL database. I tried to create this with the "Database
Interface Wizard" but it would not work, I think because
I have too many fields. I have over 150 fields in my
table.

So I have a page called expense_edit.asp. I used the
Database results wizard with a custom SQL query. I used
a form and I then put a <%=FP_FieldHTML(fp_rs,"field1")%>
in all the fields to bring in the field values for the
databse. This part of it works fine!

I also have a page called editor_updater.asp.

expense_edit.asp POSTS to editor_updater.asp

editor_updater.asp has a database results region with a
custom SQL query. The query is as follows:


UPDATE expense_report
SET employee = '::employee::', period_ending
= '::period_ending::', location_mon = '::location_mon::',
location_tue = '::location_tue::', location_wed
= '::location_wed::',
location_thu = '::location_thu::',
location_fri = '::location_fri::', location_sat
= '::location_sat::', location_sun = '::location_sun::',
break_mon = convert(money,'::break_mon::'), break_tue =
convert(money,'::break_tue::'), break_wed = convert
(money,'::break_wed::'), break_thu = convert
(money,'::break_thu::'), break_fri = convert
(money,'::break_fri::'), break_sat = convert
(money,'::break_sat::'), break_sun = convert
(money,'::break_sun::'), dinner_sun = convert
(money,'::dinner_sun::'), dinner_mon = convert
(money,'::dinner_mon::'), dinner_tue = convert
(money,'::dinner_tue::'), dinner_wed = convert
(money,'::dinner_wed::'), dinner_thu = convert
(money,'::dinner_thu::'), dinner_fri = convert
(money,'::dinner_fri::'), ent_sun = convert
(money,'::ent_sun::'), ent_mon = convert
(money,'::ent_mon::'), ent_tue = convert
(money,'::ent_tue::'), ent_wed = convert
(money,'::ent_wed::'), ent_thu = convert
(money,'::ent_thu::'), ent_fri = convert
(money,'::ent_fri::'), ent_sat = convert
(money,'::ent_sat::'), etc..etc..

WHERE entry = ::entry::

When I open the expense_edit.asp page from a link (that
links from an entry#) all the fields from the
corresponding entry# record show up in the correct
fields. I then change what needs to be changed and click
submit. I get a page that says, "The Record has been
updated Succesfully" and then when I go back and view the
record, NOTHING HAS CHANGED. Does anyone have any ideas
on why this would be happening? Thanks!

Darren
 

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

Top