Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    77

    Unanswered: Microsoft Access 2002 problem

    Hi I have some problem about ASP and Microsoft Access 2002. I just installed Microsoft Access 2002.

    I use IIs to run ASP. When I wrote Select method. There is no problem. But the problem is when I wrote Delete method I got message "Could not delete from specified tables."
    and when I wrote update method I got message "Cannot update. Database or object is read-oject." and sometime I got message

    connect.asp could not use "; file already in use.
    This is my connect.asp file
    <%
    set conn=server.createobject("adodb.connection")
    conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("db1.mdb")
    %>
    I think this file don't have a problem because when I use with Microsoft access 2000 there is no problem. I think the problem i smicrosoft access 2002

    Please help
    Last edited by gop373; 09-30-04 at 05:06.

  2. #2
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404
    I'm not sure I've understood this correctly, but I think you're opening an ASP type dataset. These tend to be read only because of the nature of ASP. There are ways to deal with this, but I usually chicken out and write an SQL string to update the recordset. This is usually a long winded apporach, so it may not suit you.

    It usually amounts to buiilding a string on the lines of:

    SQLstring = "DELETE FROM myTable WHERE TableId= " & tableID

    db.Execute(SQLstring) 'db declared and set as the database previously

    As I say there are other techniques, but this approach usually works.

  3. #3
    Join Date
    Aug 2004
    Posts
    77
    I don't think the problem comes from ASP code. Because when I run by using Microsoft access 2002 and use server (Not IIS) there is no problem.

    But when I run by using Microsoft Access 2002 and IIS to delete or edit ,it didn't work.

  4. #4
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    References?

    It won't be the code itself, it'll be the libraries the code uses. It can get quite confusing, we had similar problems when we installed Acccess XP on a system that had had Office 97. We had to not only check the references to libraries but make sure that they were listed in the correct order!

    This might not be your problem, but it might be worth checking that both applications use the same references in the same order. One reason I went for the "string" approach is that it always worked (as long as I got the construction correct).
    Last edited by Ryker; 09-30-04 at 09:24. Reason: Spelling!

  5. #5
    Join Date
    Aug 2004
    Posts
    77
    HI
    It works now.

    The first problem :::
    The message that I got "Could not use "; file already in use"
    This problem can be solved in http://support.yessoftware.com/kb_ar...p?article_id=4

    The Second problem:
    The message that I got "Cann't update. Database or object read-only"
    This problem can be solve in http://support.microsoft.com/default...b;EN-US;295200

Posting Permissions

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