I have been struggling with getting an ASP page to do what I want it to WHEN I want it to. Because I am querying a database I have basically Three states:
1. user just gets to page and enters all information (an obvious Insert SQL no reloading of page and just submit - works fine)
2. user enters dates tries to get previous data but has none in database (Not an edit so add mode is required but page has to reload with dates still there)
3. User has entered dates hits button to bring back previous data (Works) Now we are into an Update mode.
Here is my question .... can I onclick on the submit button do my Update Set Where ... without ever saying Form.submit??
Or is this needed for something other than what I am seeing as I do not go to another page so I do not need to hand the variables there. This will allow my to separate my UPDATE and INSERT code without all the variables I am seemingly toggling to prevent and set actions I mentioned above.
Sorry if this is confusing and long winded but I am just going crazy and wondered if anyone may be able to shed some light on my problem.
Joanne
1. user just gets to page and enters all information (an obvious Insert SQL no reloading of page and just submit - works fine)
2. user enters dates tries to get previous data but has none in database (Not an edit so add mode is required but page has to reload with dates still there)
3. User has entered dates hits button to bring back previous data (Works) Now we are into an Update mode.
Here is my question .... can I onclick on the submit button do my Update Set Where ... without ever saying Form.submit??
Or is this needed for something other than what I am seeing as I do not go to another page so I do not need to hand the variables there. This will allow my to separate my UPDATE and INSERT code without all the variables I am seemingly toggling to prevent and set actions I mentioned above.
Sorry if this is confusing and long winded but I am just going crazy and wondered if anyone may be able to shed some light on my problem.
Joanne