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
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
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.
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.