• Call Access Function from ASP page

    Home » Forums » Developers, developers, developers » Web design and development » Call Access Function from ASP page

    Author
    Topic
    #374996

    You’ve heard the ‘I know nothing about [ insert Product here ]’ spiel before, so I won’t give it…

    My brother is attempting to delete an Access database record from within an ASP page. He can successfully add/modify records, but cannot delete for some reason. My limited knowledge in Access/dangerous knowledge of the Access Object Model led me to create a function that will delete a record, but we cannot get the ASP page to call that function.

    I’ll accept any advice – be it a slap on the wrist and a “do it this way” or a line to add to his ASP code – or web site you can offer, and will pass the info on to my brother.

    NOTE: It is a non-relational database — it’s just a single table, AFAIK.

    Let me know what glaringly-important information I’ve left out, and I’ll get back to you. Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #608557

      I’ll bet the problem lies in the Cursor type and/or Lock type arguments of the Recordset object. You need to use a Dynamic or Keyset cursor and anything but a Read only lock type.

      Here’s an example of how to delete a record with ASP/ADO (the first line is necessary in order to use the ADO/VBScript constants – otherwise you would have to use numbers instead of constant names such as adOpenDynamic):

      HTH

      • #609163

        Thanks. He has informed me that he will be recreating his ASP page from scratch. You’ll probably hear from me in this forum in a couple of weeks.

    Viewing 0 reply threads
    Reply To: Call Access Function from ASP page

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: