I have writen this script to add a record to an access db but it does not work. This always worked when I was using win98 with PWS but now that i am using winXP pro with IIS it does not work.
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="adovbs.inc"-->
<%
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString = "DSN=abbadb.dsn"
objConn.Open
Set objRS = Server.CreateObject ("ADODB.Recordset"
objRS.Open "tblGigs", objConn, , adLockOptimistic, adCmdTable
objRS.AddNew
objRS("GigMonth"
= Request.Form("muMonth"
objRS("GigDay"
= Request.Form("txtDay"
objRS("GigYear"
= Request.Form("txtYear"
objRS("GigVenue"
= Request.Form("txtVenue"
objRS.Update
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redirect("..\gigguide.asp"
%>
The line causing the error is objRS.Update and this is the error i get:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/abba/gigguide/addgig.asp, line 18
can anyone help me?
Thankyou for your time
Andrew Wieland
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="adovbs.inc"-->
<%
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString = "DSN=abbadb.dsn"
objConn.Open
Set objRS = Server.CreateObject ("ADODB.Recordset"
objRS.Open "tblGigs", objConn, , adLockOptimistic, adCmdTable
objRS.AddNew
objRS("GigMonth"
objRS("GigDay"
objRS("GigYear"
objRS("GigVenue"
objRS.Update
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
Response.Redirect("..\gigguide.asp"
%>
The line causing the error is objRS.Update and this is the error i get:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/abba/gigguide/addgig.asp, line 18
can anyone help me?
Thankyou for your time
Andrew Wieland