Delete A Record With Asp
how do you delete data using asp, let's say i have a data listing page and by every record i want to have a delete button ?
View Replieshow do you delete data using asp, let's say i have a data listing page and by every record i want to have a delete button ?
View RepliesI been working on this code for a long time, code doesn't work and It also doesn't show any error. All I am trying to do is delete record. I click on id number from first page that brings me to this page. Code:
View Replies View RelatedI am trying to delete a chosen record out of my Access database using the ID field as the parameter. I can get the script to output the record so I know it has the record, it just won't delete! Code:
View Replies View RelatedI'm simply trying to check if the categoryid is currently being used by any catalogue/product items.
Ok, I've created a mini site content management system and I'm stuck on this function that will ensure data integrity...
I'm trying to check if the categoryid I'm trying to delete has any related 'catalogue' items (products); and if so display a message 'Sorry, there are items currently listed under this category. Move the items before trying to delete'. Basically disallow the delete function if any catalogue items share the categoryid. That's it! Simple... right???
Code:
I have news type thing on my website that displays news items that are entered using a simple html form. they go to a database (real simple so far)I also have an edit form where it loads up the entries from the database onto html forms and you can edit them and then click submit and it applies the changes to the sql database.
simple as well.one thing I can't figure out is how to add a delete button or a delete checkmark so that I can go and delete the entry out of the Database?
I have a microsoft sql database and some tables. One table of them has some dealer's requests for giving to them a mastercode for viewing some special prices. The dealer's informations appears to an asp page in a table.
i want to put a button or an link (query string) to delete separately each record. (the primary key is "clientID"). How i can do this. Which is the command?
In our database, we have a table which contains numbered items. Here is what I'm talking about: Code:
VBKey ChargeCount
12 1
12 2
12 3
12 4
19 1
19 2
When we need to delete a particular Charge (From the ChargeCount column), how can I get the remaining charges to be renumbered. For example, if I delete VBKey=12 and ChargeCount=2, how can I make ChargeCounts 3 & 4 turn into 2 & 3? I'm a little lost at making a query for it?
I'm trying to delete a record by ID. When the user clicks on the record they want deleted from website form it should delete this one record only. But I'm getting this error. Code:
View Replies View RelatedI get this weird error when I try to delete a record...
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'Cal_EventID ='.
/calendar.asp, line 1596
Here is this code on line 1596.
Code:
SQL = "SELECT * FROM Cal_Events WHERE Cal_EventID = " & SafeSQL(request.querystring("eventid"))
Set RS=dbc.execute(SQL)
I have written an events diary for a client .. and they wish to have a system of multiple deletes so they simply use a check box to select the items to delete and then hit a button to remove the selected records form the database. as all iget is scripting errors. Is there a simple way to do this?
Someone advised me to use an IN statement to Delete multiple records, but all I get is :
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'ID In ()'.
I have followed several different tutorials but I get the same outcome! It doesn't seem to like the IN statement.... any ideas anyone ???
im trying to add the delete record behaviour with dreamweaver. iv set up all the text fields and the recordsets but when the behaviour is generated the error "the original recordset in the script was not found". i have the add record server behaviour working, but this is not .
View Replies View Relatedi have found various example scripts to add/edit from database, but how can i show all the db records by id on a page, then have a form with a box to choose which record to edit/delete by id, and then when chosen, it shows the info for the record in a form, which then can be just edited and updated?
I want it to be just like as if you had just typed the details into the form itself before you registered.
I'm trying to build a web page that will automatically delete records (in Access 2k) after a certain amount of time. I need to delete records that are older than a month of the current date.
I've searched all over the internet trying to find examples of how to do this and the few that I've found don't seem to work for me. Does anyone have an example that works? Either using an sql query or programmatically. I'm using Classic ASP (VBScript).
Im trying to setup a delete record thing and it keeps telling me before using this server behavior please create a record set. However I already have a recordset on that page named rsDelete.
View Replies View RelatedI have a search page ( below is some of the code). I am currently displaying records from my Access database. At the end of each row, I am printing out a delete.gif. On click of this image I would like to Delete the printed record. How do I do this? Can you point me in the right direction? Code:
View Replies View RelatedI just need to know the DateDiff function for what I need to do...
I will store the date of the database record in a variable called 'sDate' what now? (Also, the format is xx/xx/xx 2:4:56 PM/AM)
I'm getting this error message: Error Type:
Microsoft JET Database Engine (0x80004005)
You cannot add or change a record because a related record is required in table 'employees'. Code:
I have an insert record form that posts fine to a db which automatically creates an ID how could I get the next page to do a preview using the ID just created by the DB to go to the right record?
View Replies View RelatedI have a .asp page which lists a date, then a bunch of record lines for data that falls within that date, then the next date and it's bunch of data record lines. e.g.
Ship Date: 04/06/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
What I want is:
Ship Date: 04/06/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
4: Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
How can I get these numbers printed againsts the records ?
I have this code that deletes a file using FSO but it wont work Code:
View Replies View RelatedI am trying to delete all the records from one table and insert a few in the same table.
When I run the asp it gives me the error message
"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables."
Before opening the connection to the database, I tried setting the mode to 3 as follows:
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Mode= 3
Then I open the connection. But it still gives me the same error.
How do you delete from the objRs when you choose the value to be deleted form a dropdown menu?
View Replies View Relatedi would like to be able to delete a record from a database this is the code i have atm but it is not working:
if request.querystring("action") = "delete" then
strSQL = "DELETE * FROM DVDDescription WHERE DVDDesc_ID=" & request.querystring("DVDDesc_ID") & ";"
objRS.open strSQL,conn,1,2
'objRS.close
end if
Code:
I'm getting an error from something that seems too easy to cause
trouble. Here's the scenario. User fills out a form. User saves. On
submit, an asp script attempts to save the data. it deletes all of
existing child records, and then re-inserts new child records.
Heres the chunk of code thats bombing out with a 'Microsoft OLE DB
Provider for SQL Server error '80040e31' ':
'delete all children for this Parent record
strSQL = "DELETE FROM qcspec_is_tasks WHERE parentID = " & nRecID
debugPrint strSQL
cn.Execute strSQL
The print statement yeilds the following, before the Execute statement
dies:
DELETE FROM qcspec_is_tasks WHERE parentID = 20
If I run the above in query analyzer, it executes instantly.
Incidentally, at this point in time, the table is tiny. Its only 50
rows or so, at the moment.
I have this query
strsql = "Delete FROM College_List WHERE
STDID = (Select ID from Students where StudentID='" & getstdid & "')"
i get this error
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
but i want to delete all the records in the child table that have the ID in the parent table which is students.
During the development, I need to test cookies (ASP and ASP.net).
For the first time I test (First username), it writes the cookies into my computer using the First username, and when I want to test second time, using another user name (Second username), it wont't show up the login page, but instead it automatically let me access the protected page (using the first test username).
Question: I want to delete this cookies! How?
I have searched:
Temporary folder, and can't find it.
Document and settings (W2000 Professional), and can't find it as well.
The easiest way to describe my situation is by using the 'email' example. I retrieve my email messages and place a 'delete' checkbox by each message. I select the messages I want to delete and then click the delete button. They magically disappear.
I'm using ASP-->COM-->Stored Proc. I've envisioned creating a recordset to hand to the COM, then for each record fire the stored proc (although I'm unfamiliar with modifying a recordset before a form submit).
I have this code where I can check mark the items I want to delete and hit the submit key and it will delete the records, but the problem is that when I hit submit it opens another window for the same page and I can see that the records are the deleted, but the page where I checked marked the boxes to delete the records is still there and its still showing the records.
I dont want to open another window, I want all this process to happen in the same page and when I click on the delete button it should delete the records and the same page should refresh. Code:
Is it possible after i run my process i delete text files from server.
I run a process to read from text files after that i want to delete
these text files so that no one again run the process.I am using ASP.
Basically I'm trying to combine an SQL inner join with a delete statement, like:Code:
var cnn = Server.CreateObject('ADODB.Connection');
cnn.Open(Application('cnn'));
cnn.Execute('delete * from editors_sections inner join editors on editors_sections.editor_id = editors.editor_id where editor_id='+intEditorId+' and editor.isSectionOne=0 or editor.isSectionTwo=0 or editor.isSectionThree=0');
cnn.Close();
But it gives me the following error:
Incorrect syntax near '*'.
Can this be done, and if so, can anyone see where I'm going wrong (I'm using JScript if that makes any difference?)
can someone help me. I'm writing an onlineshop in asp and for the shopping cart
i use an array. If someone wants to delete some articles from the cart, i have to
delete them from the array. How i delete only one article (on line) from the array.
How can I delete a file which is saved in a folder when the user checked on the checkbox of the file to be removed and click on the Delete button?
View Replies View Relatedhow do i automatically delete records on date submitted
View Replies View Related