HELP! Adding to Access 97 db

Results 1 to 4 of 4

Thread: HELP! Adding to Access 97 db

  1. #1
    Troy Guest

    Default HELP! Adding to Access 97 db

    I&#039ve been able to get my website mostly working by reading the great posts here! Thanks. Now I am completely stuck. I am trying to write data to an Access 97 database. I&#039ve tried every method I can find, but nothing seems to work. Below are 2 methods I have tried.<BR><BR>First:<BR><BR>&#060;% Dim conn<BR> <BR> Set conn = Server.CreateObject("ADODB.Connection")<BR> "DSN=MyClub" &#039My ISP happily charged me to set<BR> &#039up a DSN after I gave up with the<BR> &#039DSN-less connection!<BR><BR> conn.execute("INSERT INTO Votes " & _<BR> "(DateOfVote, MemberID, Voter, Vote) " & _<BR> "VALUES (&#039 11/08/99&#039, 1, &#039Troy&#039, 5)")<BR>%&#062;<BR><BR>The above (using a DSN or DSN-less connection results in "object or database read-only".<BR><BR>Then I tried the following (both DSN and DSN-less:<BR><BR>&#060;% Dim conn<BR> Dim RS<BR> <BR> Set conn = Server.CreateObject("ADODB.Connection")<BR> "DSN=MyClub"<BR><BR> Set RS = Server.CreateObject("ADODB.Recordset")<BR><BR> RS.activeconnection = conn<BR> RS.CursorType = 1<BR> RS.LockType = 3<BR> RS.Source = "Select * From Votes"<BR> RS.Open<BR><BR> RS.addnew<BR> RS.Fields("DateOfVote") = Date()<BR> RS.Fields("MemberID") = 1<BR> RS.Fields("Voter") = "Troy"<BR> RS.Fields("Vote") = 5<BR> RS.Update<BR> RS.Close<BR> Set RS = Nothing<BR> Conn.Close<BR> Set Conn = Nothing<BR>%&#062;<BR><BR>I get the same result. My ISP INSISTS that the database priveledges are set so everyone has read-write access to the *.mdb file, so I&#039m assuming my Access queries are read only. There are know relationships with the Votes table, nor do I have any group by/sum queries on it. I can&#039t get this working! I have been trying to resolve this for 2 weeks!!! I am absolutely stuck.<BR><BR>Is there anything anyone can suggest before I jump!<BR><BR>Thanks,<BR><BR>Troy

  2. #2
    Troy Guest

    Default Sharon Chandler below seems to have...

    the same problem I have. Sharon, if you read this and figure it out, please post it!!!<BR><BR>Thanks,<BR><BR>Troy

  3. #3
    Troy Guest

    Default possible solution...

    although I&#039m not sure what it&#039s telling me. I&#039ll call my ISP tomorrow and see if it make sense to them.<BR><BR>Troy<BR><BR>FAQ #1:Operation must use an updateable query. <BR>I get this error message when adding or modifying data:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039<BR>Database Error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.<BR><BR>This is a very common error message when updating Access databases. Since Access is file based any attempt to update the database by an ASP script can only modify the Access databases if permissions are established correctly.<BR><BR>Go to the parent directory where the database is stored. Click on the folder permissions and set IUSER_xxxxx to &#039change&#039 where xxxxx is the machine name. Make sure the file is also set so the ISUSER_xxxx can change the file.<BR>

  4. #4
    Sharon Chandler Guest

    Default RE: Sharon Chandler below seems to have...

    It works !!!!. I contacted my ISP and it appears that the directory the database was set up in did not have RWXD attributes for all which accounts for why the Select worked but not Add.They altered the attributes and everything is fine. Good luck with yours &#060;g&#062;

Posting Permissions

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