can read but not insert records

Results 1 to 2 of 2

Thread: can read but not insert records

  1. #1
    Join Date
    Dec 1969

    Default can read but not insert records

    I am having a problem with adding records to a database. I&#039ve got a web page that users can enter in a record into an access database based on form input. It queries a client table to get their name based on an identification number and adds that to the record in addition to the form input. It works perfectly on my development machine. However, when I move onto the web server, using IIS on NT 4.0 and the latest version of MDAC, I get this error when the page tries to insert the record into the database:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. <BR><BR>/PChelp/default.asp, line 100 <BR><BR>I do have database connectivity and can open the recordset to get client information out of the client table. The problem only exists when I try to execute SQL. (Which works perfectly on my development machine-win98se w/PWS)<BR>I had the server admin give the IIUSER account change permissions on the folder and that did not help. Here is my code: <BR><BR> Dim adoConnection<BR> Set adoConnection = Server.CreateObject("ADODB.Connection")<BR> Dim adoRecordset<BR> Set adoRecordset = Server.CreateObject("ADODB.Recordset")<BR><BR><BR> <BR> adoConnection.ConnectionString = "DSN=Tickets"<BR><BR><BR> adoConnection.Open<BR><BR> adoRecordset.Open "Select * FROM Tickets", adoConnection<BR><BR><BR><BR> strSQL = "INSERT INTO Tickets (GID, Phone, Effect, Function," &_<BR> "[#Affected], ReqorOrder, Mainly, Symptom, Details, Opened, Status) VALUES (&#039" & GID & "&#039, &#039" &_<BR> phone & "&#039, &#039" & effectonitem & "&#039, &#039" & jobfunction& "&#039, &#039" & numaffect & "&#039, &#039"&_<BR> workorsupport2 & "&#039, &#039" & mainlyinvolve & "&#039, &#039" & symptom & "&#039,&#039" & dispatch &"&#039, &#039" & Date &"&#039, &#039Open&#039)"<BR><BR><BR> adoConnection.Execute strSQL<BR><BR> adoRecordset.Close<BR> adoConnection.Close<BR> Set adoRecordset = Nothing<BR> Set adoConnection = Nothing<BR><BR>The error page refers to the line with "adoConnection.Execute strSQL". Does anyone have any idea what is going on? The page works perfectly on my development machine, but it blows up on the web server. Thanks-<BR><BR>Joe

  2. #2
    Join Date
    Dec 1969

    Default RE: can read but not insert records

    My first thought is to make sure you have Read/Write access on that folder.

Posting Permissions

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