Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 14th, 2005, 11:16 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default updating and deleting record


Hello

I have written some basic ASP code to update or the delete the existing record in my database. The code seems to work fine on my desktop with IIS but it doesn't work on the server or on my laptop and gives me the following error for deleting

Microsoft OLE DB Provider for ODBC Drivers (0x80004005), could not delete from specified tables for

and this error for updating:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005),operation must use an updatable query.

Does anyone have any ideas why this may happen, it does work perfectly fine on one machine but not on others :(

Thanks


  #2 (permalink)  
Old March 14th, 2005, 11:43 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

do you sql statements or ADO objects?

  #3 (permalink)  
Old March 14th, 2005, 11:52 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I use SQL statements such as the following for editing:

targetString = "UPDATE cvtable SET Name = '$name', Surname='$surname', Gender='$gender', Cvtext = '$cvtext' WHERE ID=$id"

targetString = replace(targetString, "$name", request.form("Name"))

targetString = replace(targetString, "$surname", request.form("Surname"))

targetString = replace(targetString, "$gender", request.form("Gender"))

targetString = replace(targetString, "$cvtext", request.form("cvtext"))

targetString = replace(targetString, "$id", request.form("ID"))

conn.execute targetString

and this one for deleting:

Conn.execute "DELETE * FROM cvtable WHERE ID= " & cv_id

What would be the difference between using SQL or ADO and which one is more beneficial?

Thanks


  #4 (permalink)  
Old March 15th, 2005, 01:56 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear i was also facing the same prob with the web host.The solution was that where i was keeping me database that folder was read only at the server.so i changed the folder and now it is ok. You may check it also perhapes it may work for you too.

  #5 (permalink)  
Old March 16th, 2005, 05:50 AM
Authorized User
 
Join Date: Apr 2004
Location: Gurgaon, Haryana, India.
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ranakdinesh
Default

I THINK THIS IS BECUSE THE DIRECTORY ON YOUR SERVER IN WHICH YOU KEEP YOUR DATABASE DOSENT HAVE WRITE PERMISSION ASSIGN WRITE PERMISSION TO THAT DIRECTORY. OR ASK YOUR WEB ADMINISTRATOR TO DO SO


dinesh rana

dinesh Rana


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting A Record sirmilt BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 July 31st, 2006 07:12 PM
Updating/Deleting from SQL using ASP Tee88 Classic ASP Databases 4 May 6th, 2005 11:14 AM
error in deleting,updating and records in asp method Classic ASP Databases 1 May 6th, 2005 10:35 AM
Updating & Deleting Rows from a Repeater saturdave ASP.NET 1.0 and 1.1 Basics 4 February 19th, 2004 04:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.