ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 4th, 2003, 10:22 PM
promethius23 promethius23 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 promethius23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cannot change access database

I'm having problems using the "update" command of the recordset object. I can read from the database perfectly, but I can't write to it.

The following code is just a sample of my whole code (but it uses the same logic):

<%@LANGUAGE="VBSCRIPT"%>
<%Option Explicit%>

<!--#include file="adovbs.inc"-->

<%
dim connstr,data,rs, sqlcmd, conn

set conn = server.CreateObject("ADODB.Connection")
conn.connectionString = "DSN=student"
conn.open

set rs = server.createobject("ADODB.RecordSet")
connstr = "SELECT * FROM info"
rs.Open connstr, conn, 2, adLockOptimistic, adCmdText

rs.moveFirst
response.Write(rs("name"))
rs("name") = "Neil"
response.Write(rs("name"))
rs.update
response.Write(rs("name"))
%>

I get the following message when I try to use it:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

I checked to see whether the database or table was "read-only" - but they're not. In addition, I checked on ODBC and I used the "Microsoft Access Driver," which should be correct.
Can anybody tell me what I did wrong? Why can't I do anything to change the database table?

Reply With Quote
  #2  
Old September 5th, 2003, 12:10 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,957 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 15 h 35 m 19 sec
Reputation Power: 802
More than likely the user account that the web server is operating under doesn't have write permissions to the .mdb file.

Since you're using a DSN and ODBC, it's possibly a permissions issue with the ODBC section of the registry, or the TEMP folder (ODBC and Access causes IIS to use the TEMP folder in windows)

It's possible that the dynamic cursor you're using isn't updateable. You might try using a static cursor.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > cannot change access database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT