: I have a include file called databaseconnection.asp
:
:
'databaseconnection.asp file
: <%
: Dim adoCon
: Dim strSQL
:
: Set adoCon = Server.CreateObject("ADODB.Connection")
:
: adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)};" &_
: "Dbq=C:\Inetpub\wwwroot\EL3888NetApplications\database.mdb; "
: %>
:
:
:
' this is a screen called buy.asp
: <%@ Language="VBScript" %>
: <!-- #include FILE="DatabaseConnection.asp"-->
: <HTML>
: <HEAD>
:
: <%
: Dim value
: Dim customerId
: Dim rsGuestbook
:
: value = Request.QueryString("ProductId")
: customerId = 12
:
: strSQL = "INSERT INTO ShoppingBasket Values ('" +Cstr(value)+ "','" +Cstr(customerId)+ "') "
:
: 'Response.Write(strSQL)
: 'strSQL = "SELECT * FROM shoppingbasket"
: Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
: rsGuestbook.Open strSQL, adoCon
: Response.Redirect("Search.asp")
: %>
: </HEAD>
: </HTML>
:
: I though it was somthing todo with the variables being integer but i have fourced them into string cstr().
: When i run the insert SQL i can an error:
:
: Error Type:
: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
: /EL3888NetApplications/Buy.asp, line 19
:
:
: Anyone got any ideas, SELECT statements work fine.
Probably the same problem described here, both INSERTs and UPDATEs will give that error of the .MDB file is not writeable by the IUSR_MachineName account:
http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=22&MsgID=335097&Setting=A9999F0001