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 October 24th, 2003, 11:06 AM
djjc djjc is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 11 djjc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 29 sec
Reputation Power: 0
database access

I am new to ASP and have been having lots of fun/sucsess learning it however i have hit a wall.

What i need to do is get some info from an Access database that i have, and display it (no problems here).

Then i need the user to be able to edit the info and save thier changes back to the database.

I have set things up so that the user sees some html forms that show them options for changeing the filed in the database. These options are generated dynamically from a different table in the same database.

I can do all of this just fine but what i can't do is save the info back to the database i get this following error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

So here is the code where i open my database connection:

<% Dim objConn, Record
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};_ DBQ=" & Server.MapPath("LAPD.mdb")
Set Record = Server.CreateObject("ADODB.Recordset")
Record.Open "SELECT * FROM Projects WHERE City= '" & City & _"' ORDER BY City ", objConn, adOpenDynamic, adLockOptimistic

Can anyone see why i can't edit the database? I think i aopendit dynamically and with an optimistic lock.

Thanks

Reply With Quote
  #2  
Old October 24th, 2003, 04:05 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Jun 2003
Posts: 11,118 Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 12 h 59 m 42 sec
Reputation Power: 830
Check the windows file permissions and make sure the .mdb file isn't marked as "read-only"

Reply With Quote
  #3  
Old October 25th, 2003, 04:32 AM
chuachongchee chuachongchee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 57 chuachongchee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
check the NTFS file permissions...

if u are using:

1)win2k...
check that 2 users: "IUSR_[pc name] and IWAM_[pc name]" are inside and are given *FULL* permissions...

2)winxp pro
check that "use simple file sharing" is *DISABLED* under edit--> folder options..
then follow the instructions for win2k..

these are the 2 "users" that actually access the files in ur http server.

Reply With Quote
Reply

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


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 2 hosted by Hostway
Stay green...Green IT