Hey John, It appears that you are trying to delete a record from a table in the database. Based on looking at your code below, I would want to check the connection to the database that you have and verify that the user account attached to the database actually has the rights to delete a record.
If your dB user account has delete priviledges, then I would ask you to copy/paste the error that you are receiving so that we can help you diagnose your problem. William -----Original Message----- From: John Barrett [mailto:[email protected]] Sent: Sunday, June 19, 2011 10:32 PM To: cf-newbie Subject: delete page Hi, can somebody help me understand deleting a page. In the first page I have a cfquery to get the information, using WHERE record_id = #URL.record_id#. I am hoping that the information is already in the boxes. Then on the second page I delete the enrty by : <cfquery name="DeleteTip" datasource="#REQUEST.dataSource#"> DELETE FROM reference WHERE record_id = #Form.record_id# </cfquery> Am I doing something wrong here? thanks, Johnny see code below. <! delete_page---> <cfquery name="GetReferences" datasource="#REQUEST.dataSource#"> SELECT * FROM reference </cfquery> <h2>delete daily tip</h2> <cfquery name="GetRecordtoDelete" datasource="#REQUEST.dataSource#"> SELECT * FROM references WHERE record_id = #URL.record_id# </cfquery> <cfoutput query="GetRecordtoDelete"> <table> <form action="delete_action.cfm" method="Post"> <tr> <td>record id:</td> <td><input name="record_id" type="text" value="#record_id#" size="25"></td> </tr> <tr> <td>topic</td> <td><input name="topic" type="text" value="#topic#" size="25"></td> </tr> <tr> <td>reference:</td> <td><textarea name="reference" cols="30" rows="6">#reference#</textarea></td> </tr> <tr> <td>research link:</td> <td><input name="reference_link" type="text" value="#references_link#" size="50"></td> </tr> <tr> <td> </td> <td><input type="Submit" value="Delete Information" onClick="return confirm('Are You Sure You Want To Delete This Record?');"></td> </tr> </form> </table> </cfoutput> <!--- delete_action---> <cfquery name="GetReferences" datasource="#REQUEST.dataSource#"> SELECT * FROM reference </cfquery> <cfquery name="DeleteTip" datasource="#REQUEST.dataSource#"> DELETE FROM reference WHERE record_id = #Form.record_id# </cfquery> <cfoutput> <p>record id: #Form.record_id# <br /> topic: #Form.topic# <br /> reference text:#Form.reference# <br /> reference link: #Form.reference_link# <br /> </cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5303 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
