Knowledge Base

Result search in category Access New Search
Hosting >> Business >> Database >> Access
ASP Error: Microsoft JET Database Engine error '80004005' Operation must use an updateable query

If from your ASP script you receive the following error:
Microsoft JET Database Engine error'80004005 'Operation must use an updateable query.
/page_name.asp, line xxx

be sure the folder where resides the Access database has at least "Write" permissions.
You can check folder permissions through the control panel.

 
Hosting >> Business >> Database >> Access
Connection to an Access database from web pages

It is possbile to connect to Access DB from the web pages using one of the following methods:

  1. ODBC DSNLESS connection
  2. ODBC DSN connection
  1. ODBC DSNLESS connection
    This type of connection permits to connect to a database not using a DSN file system, but a direct connection to the database on the server, indicating the path:
         conn.Open "DRIVER=(Microsoft Access Driver (*.mdb));DBQ=D:\Business\yourdomain.com\private\database.mdb"

  2. ODBC DSN connection
    To create a DSN connection, you must create a file DSN by using the control panel by clicking on the button "ODBC Setup" and then use the following connection string:
         conn.Open "DSN=Test;UID=Admin;PWD=Test"

Here you can find an example of a connection, how to read and to close a database:

1. First define the connection object instance:

Dim conn
Set conn = Server.CreateObject ("ADODB.Connection")

2. Then through the object can connect to our database (in this example we use a connection DSNLESS):

conn.Open "DRIVER=(Microsoft Access Driver (*.mdb));DBQ=D:\Business\yourdomain.com\private\database.mdb"

3. Create the SQL query to the database:

sql = "SELECT * FROM table"

4. We create the Recordset object that is populated by data from our query:

Set rs = Server.CreateObject ( "ADODB.Recordset")
rs.Open sql

5. Manipulate the returned data:

Response.write rs ( "nome_colonna")

6. At the end of transactions we close the recordset and the connection is enabled:

rs.Close
Set rs = Nothing
Conn.Close
Set Conn = Nothing


IMPORTANT: We recommend to close all open objects and database connections as soon as you finish using them to free serverresources and make them available again to all other users. For the same reason you should not call Connection and Recordset objects within the Application or Session objects from the global.asa file.

 
Hosting >> Business >> Database >> Access
Where to place Access files (*.mdb)

You should place any Access databases your website uses into the "private" folder on the root of your webspace.

 
New Search
This website uses cookies. Some of these cookies have been set already. More information can be read in our privacy policy.
You can accept our cookies by clicking here or by continuing to use the site