You missed out the most important bit;
what does the query look like after it has been concatenated
hint:
response.write out MM_editQuery before the call to execute.
However I would suggest that your approach is incorrect for several reasons;
Using the one form to display, edit and update several record is woefully innefficient unless you are proficient enough in coding to be able to construct a loop that will determine which records have been changed and only update those.
This of course can also be inefficient as the code has to loop through all the records where only one may be required, fine for a few dozens records but very time and resource heavy for a few hundred or more.
By all means have a single page to do the work but what you need to do is select only one record to update, then display this. When changed and the submit button is pressed (which now says "Update") detect this and update that one record "WHERE table.id = " etc.
This method probably does preclude the use of DW to write your code so you will have to get your hands "dirty".
Your table structure looks inneficient as well;
I would guess that you are using the text in your example table data as the PK - FK relationship between the linked table. This is not the way to have a normalised structure. Your tblResults should only contain the IDs of the records in the other tables. This reduces data redundancy and avoids the major problem with spelling errors when editing data (change one and they all change)
[off topic]
it's Coca Cola BTW. Coke is a different thing entirely (used to fuel furnaces in the steel industry )
[/off topic]
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|