CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jun 2013
    Posts
    102

    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 :-(

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    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.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jun 2013
    Posts
    102

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

    Quote Originally Posted by DataMiser View Post
    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 !

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    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.
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    Jun 2013
    Posts
    102

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

    Quote Originally Posted by DataMiser View Post
    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
    ...

  6. #6
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    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

    see the forum index
    http://forums.codeguru.com/forum.php

    There is also the sister site which may have a bit more activity in the ASP section at
    www.vbforums.com

    More specifically
    http://www.vbforums.com/forumdisplay...-ASP-VB-Script
    Always use [code][/code] tags when posting code.

  7. #7
    Join Date
    Jun 2013
    Posts
    102

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

    Quote Originally Posted by DataMiser View Post
    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

    see the forum index
    http://forums.codeguru.com/forum.php

    There is also the sister site which may have a bit more activity in the ASP section at
    www.vbforums.com

    More specifically
    http://www.vbforums.com/forumdisplay...-ASP-VB-Script
    Thanks for the info DM... I will certainly go and have a loo around !! tomorrow because it is 05:15 here now so.... night for now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured