If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How do I insert a confirmation prior to DB deleting a record

I have a .asp script which has VB embedded. One of the functions in this script is to identify a category and the number of associated events in that category as presented in an onscreen form. Currently the function offers a simple delete button and a text warning.which works well. However when you delete the category it wipes all of the records and the only way back is to upload a backup copy of the Access DB. I would like to insert a pause and redirect the function to a new script that allows you to confirm the deletion before carrying it out. A bit of built in security.. just in case. Has anybody got any help they can offer me please, relative newbie skills at this end :-(

Re: How do I insert a confirmation prior to DB deleting a record

Rather than a pause and a redirect you could use a msgbox that would prmpt the user for confirmation. You could do this via client side VB script as well so no need to load a different page or redirect anything.

Re: How do I insert a confirmation prior to DB deleting a record

Originally Posted by DataMiser

Rather than a pause and a redirect you could use a msgbox that would prmpt the user for confirmation. You could do this via client side VB script as well so no need to load a different page or redirect anything.

Hello DM and thank you picking me up again I was hoping you would . I'm not sure where to add a message box because the script goes through quite a process of gathering information relating to both the evens in the record and the record itself. It then seems to construct and execute an SQL statement according to the notes that come with the software. They're not very explanatory. It would be nice to actually halt and clear the form so a user has no choice but to see the statement as the screen is a bit full of information as it is.

Is there anything I can do to put debug test in each stage in so I can figure out what it's doing. The code is not exactly indented correctly from what I can see. Also, whilst browsing through you comments I came across the example of indentation you showed me and looked at the code... as it happens I use a similar feature on my site so with your permission I will try and see if I can make it do what I want it to as the old form is about 8 years out of date !!

That inherent fault in the software I was talking about earlier is really strange but I am going to run with it as it was there from day one. I actually only need 4 colours and as long as I select black as my last colour it works fine... weird or what !

Re: How do I insert a confirmation prior to DB deleting a record

Well the script for a msgbox would be client side which means that script would get transfered to the browser as part of the web page rather than executed with the other script on the server. When you click your button rather than submitting the page it would need to call the script which would display the message box and test the result and then submit the page if that is what the user choose.

That said this is not really the right area for these questions as they are not really related to VB and are ASP and client side scripting. There are areas on the forum for those types of questions and you may or may not get better results there.

I personally have not touched an ASP script in over 10 years. I use VB.Net with ASP.Net and ADO.Net for this kind of thing so I am pretty rusty on the older ASP stuff.

Re: How do I insert a confirmation prior to DB deleting a record

Originally Posted by DataMiser

Well the script for a msgbox would be client side which means that script would get transfered to the browser as part of the web page rather than executed with the other script on the server. When you click your button rather than submitting the page it would need to call the script which would display the message box and test the result and then submit the page if that is what the user choose.

That said this is not really the right area for these questions as they are not really related to VB and are ASP and client side scripting. There are areas on the forum for those types of questions and you may or may not get better results there.

I personally have not touched an ASP script in over 10 years. I use VB.Net with ASP.Net and ADO.Net for this kind of thing so I am pretty rusty on the older ASP stuff.

Wow and here's me thinking I was bringing my website and software up to date. I wish I could do the same as you and really roll on :-) I don't know any other forums really DM and I thought that this was one that sounded a likely source of knowledge. I understand what you are saying but am not how to implement it. Do you know of a another forum I can join or perhaps have a contact name for me to whom you can pass me over to??

On another subject completely and I don't know if I can di this...I have to say I am ashamed by the way our government voted tonight and believe me when I say the UK public will kick off given half a chance. what I saw tonight on the news was horrendous... schoolchildren for God's sake. Politicians do not always represent the mood of the country and they went a bit too far left for my liking and got it WRONG again. I've gone out there on you tube and kicked up a fuss. totally out of character to me. I'm with you guys and our special relationship all the way. How embarrassing would it be for the French to join forces while we sit idly by. It's up to you guys... put it right for all those people and stick a few in there for us.. power to your thoughts and determination my friend
...

Re: How do I insert a confirmation prior to DB deleting a record

I wasn't referring to other forums, this site is broken down into sections right now you are posting in the section for Visual Basic 6 and older there is also a section for scripting and section for client side scripting and a section for ASP.Net

Re: How do I insert a confirmation prior to DB deleting a record

Originally Posted by DataMiser

I wasn't referring to other forums, this site is broken down into sections right now you are posting in the section for Visual Basic 6 and older there is also a section for scripting and section for client side scripting and a section for ASP.Net

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.