Current location: Hot Scripts Forums » Programming Languages » ASP » Error Updating Access DB

Error Updating Access DB

Reply
  #1 (permalink)  
Old 12-04-05, 11:54 AM
daint daint is offline
New Member
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Error Updating Access DB

Hello,

I'm getting the same error as a recent post "ADODB.Recordset error '800a0cc1' " but felt I should post my own request rather than hijack theirs.

I can add to the database and view the database through forms on my website, but when it comes to updating, it gives me an error

'Item cannot be found in the collection corresponding to the requested name or ordinal. '

The code in my Update example is

Set RS = oConn.Execute("UPDATE news SET desc='" & request("update_text") & "' Where id=" & id & ";")

the add command that works without error is

Set RS = oConn.Execute("Insert into news values (" & id & ", '" & t_Date & "', '" & request("update_title") & "', '" & request("update_text") & "', 'Yes')")

I have checked and double checked that there is a field called desc, when I update another field in the table it works fine. I had the same problem with another db, but made a new field, copied the data over and all seemed to work ok, but don't want to have to do this for every db I ever do.

The permissions are all set ok, desc is a memo field, but due to length, I'm unable to make it anything else (just in case this may be the problem)

Hope someone can help

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-04-05, 04:10 PM
koncept koncept is offline
Community VIP
 
Join Date: Oct 2004
Location: Cleveland Ohio
Posts: 1,791
Thanks: 0
Thanked 0 Times in 0 Posts
desc is a sort keyword you need to enclose it in [] to allow it to work
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-05-05, 08:32 AM
digioz's Avatar
digioz digioz is offline
Community Leader
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 1,987
Thanks: 2
Thanked 3 Times in 3 Posts
As "koncept" was saying, try using the following SQL String instead:

Code:
Set RS = oConn.Execute("UPDATE [news] SET [desc] = '" & request("update_text") & "' Where [id]=" & id & ";")
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php - copy ACCESS db. feffik PHP 0 04-04-05 09:23 AM
Problem with inserting values into an access db pinochio53 ASP 1 03-29-05 12:53 PM
MS Access DB not updated simplyVB Visual Basic 0 06-28-04 03:20 PM
Access DB -> FTP uploading Project Vadim Job Offers & Assistance 1 06-12-04 05:46 PM
A simple form to upload fields to an Access Db techknow Script Requests 1 04-19-04 10:11 AM


All times are GMT -5. The time now is 02:49 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.