How To Delete Multiple Records Using A Series Of Checkboxes
Does anyone know how i could print multiple records in a database using a series of check boxes on a webpage? i.e it prints all the records that have been ticked?
View RepliesDoes anyone know how i could print multiple records in a database using a series of check boxes on a webpage? i.e it prints all the records that have been ticked?
View RepliesI have created my own web mail system, and when the user has mail is automatically inserts it into a database. Now I need to be able to allow the user to delete the mail, either 1 or more at a time.
I have two select boxes, ones the option of what to do with the selected mail. Then I have another box which is only for the likes of moving mail to a different folder ( ie personal folders ).
Now When I select the mail I want to delete, then select Delete from the drop down box and then press submit, It should then loop through all the selected items and then delete them.
But when I try it doesn't delete them and doesn't provide an error, then I looked into it and used this: Code:
SQL 2000 database with ASP
I've found many things "out there" regarding updating and deleting
multiple records with checkboxes but I can't seem to find anything
about adding them. A user wants to create a price list for their
client and they need to add parts to it in a separate table. I would
like to display the list of parts and the user would select multiple
parts to add to a price list by checking a checkbox and submitting the
form. Code:
I read this article below and play around with delete multiple records function in dreamweaver. Assume that all my database fields setup are exactly like the code below. I was able to follow the instruction and did everything excepted line# 29. Can someone give me a suggestion of the line# 29 suppose to be (in example if possible).....
View Replies View RelatedI display work request records from a db table into a .html table dynamically by cycling through the db table until RS.EOF.
To the right of each record displayed I have two checkboxes, "chk_dev_accept", "chk_dev_sendnotif". These are the only editable items on the page.
"chk_dev_accept" is clicked by the developer to assign the work request to his/herself.
"chk_dev_sendnotif" is clicked if the developer wants to notify the customer that the status of the job has changed (optional and automatic - I don't have a problem with this part).
Upon clicking the "Update Record" button, I want the records with the checkboxes clicked to update.
The db record fields that would be updated are: "dev_developer" (The developer that will do the job, read from a cookie) and "dev_proj_status" (changed to 'Assigned'). These two fields should update when the "chk_dev_accept" is clicked and form submitted. I want the developer to check as many records as he/she wishes.
My problem is I'm not sure how to code that <input checkbox....> tag, and then, how to take that checked value to select the appropriate records to update.
i put a message box and asked the user if they are sure they wana deletethe record. if no,it will cancel the work.
if yes, it will delete the last record no matter which record you choose. i see where the problem is because the code come in a loop and so the last value of that loop will be the last one. i need to know if there is a way to solve this so that it will take the value of the chosen record?
This code works great--but only the first time. Once the HoldingTable1 is created, I can't get the SQL to append records. Anybody have any ideas how to tweak this into an INSERT INTO statement that works?
strSQL = "select * into HoldingTable1 from " & strTableName & " where " & AddWrappers(strKeyField) & "=" & gstrQuote & Replace(request.form("mdelete1")(ind), "'", "''") & gstrQuote
dbConnection.Execute strSQL
dbConnection.Execute strSQL
strSQL="Delete from " & strTableName & _
" where " & AddWrappers(strKeyField) & "=" & gstrQuote & Replace(request.form("mdelete1")(ind), "'", "''") & gstrQuote
I created a form that will update or delete a record using ASP and FrontPage 2002. This worked fine until I loaded the .Net framework 1.1 on my Win 2K server. Now when a user tries to delete a record or perform an update of a record the following error is given.
Your page contains a query with user input parameters that could not be resolved. This could happen if your DatabaseRegionStart webbot has an empty or missing s-columnnames or s-columntypes attributes. You may need to read Microsoft Knowledge Base Article 817029. This article only refers to how to fix the problem in FrontPage 2003. What do we do to fix the error for those of us who have not updated to FP 2003?
At the load of an ASP page I would like to delete all records in my MDB that have the value of 'gmp@gmail.com' in the 'email' field. How would I do this using VB? Here is the code I have: Code:
View Replies View RelatedI've got a table with three fields:
ref (Autonumber)
notice (memo)
expdt (Date)
I'm trying to use an SQL statement to delete all records where expdt < the current date (Now). Here is the code I'm using:
<%
If Request.Querystring("act") = "clean" Then
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open ConnStr
strExpdt = cdate(Now())
sql = "DELETE FROM tblNboard WHERE expdt < " & Now()
conn.Execute sql
conn.close
set conn = nothing
strResponse = "All expired notices have successfully been deleted."
End If
%>
However, this just gives me the following error:
Syntax error (missing operator) in query expression 'expdt < 11/12/2003 19:54:25'.
What am I doing wrong??
how can you delete every single record in a table from the access DB with a DATE column, which stores the date in format DD/MM/YYYY? Code:
View Replies View RelatedI 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 ???
I try to do a multiple delete of files through FileSystemObject, but after deleting the first file, ASP gives me a "Permission denied" error. Below you see my code:
Set fso = CreateObject("Scripting.FileSystemObject")
For Each Item in Request.Form("filename")
delFile = path2 & "files" & Item
fso.DeleteFile delFile
Next
I have to develop a page where, based on status some records are selected from the Access database and displayed. A checkbox is displayed beside every record.
Some checkboxes can be selected and the corresponding record should be deleted if the delete bottun is pressed.
I know how to select the records from the database and perform multiple delete. But do not know how to link the database and the checkboxes. Anybody has any ideas??
i hav problem with updating the data. In the asp page i hav displayed records based on search criteria. in display mode im displaying the to be updated field in combo box for each similar contract_no. each contract_no will hav different no of rows and to be updated combo box.
based on the selected value in the combo boxes of different contract_nos i hav to update the combo value with old value. user select multiple combo values at a time I need anybody's help with detailed programming logic.
Just got back from a half marathon and my brain is leaking more than my shower. I've got me an sql statement that uses the count facility, hence im expecting a numeric value to be returned when the query is executed.
However, I want to run a series of if statements against the result - so I guess I need to get the result into a variable or such, to do the work on. Problem is, I dont know how. Worse still, it seems that nowhere on the web is a tutorial telling you how.
i'm developing a site but i'm still new to ASP..i could only
code a simple DB [add/edit/remove] coding..
i need to creat accounts for users, so i must have a LOGIN page
contains all the standard such as: Logout, register new user,remember password ,,
users who should register in my site , are previously stored in DB by a KEY field..not to allow any user to register..a new user should only insert that key,if it is exist in my record,i shall allow him to view some pages.
I have this search and results system on one page....
I'd like it where the results that come up from the search are editable and can be updated.
I can't seem to figure out a working way to update more than one field at a time.anyone have a good piece of code for multiple edits
I need to retrieve multiple records and insert all of them into different table.I got an error running the code below.
<%
FilePath = "C:Inetpubwwwrootdata.mdb"
Set Conn1 = Server.CreateObject("ADODB.Connection")
Conn1.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";"
SQL1 = "SELECT name FROM total where marks = 2"
SQL2 ="INSERT INTO people (names) values ("SQL1")"
Conn1.execute(SQL1)
SQL1.MoveFirst
while not SQL1.EOF
Conn1.execute (SQL2)
SQL1.MoveNext
wend
%>
I have to create a page that contains a daily register information for more than 1 person each person should be added as a new record to the db. Is this possible? How would I go about doing this, I know how to create new records that add data to a db but I am not too sure how to add more than 1 record at a time.
View Replies View Relatedhow to update multiple records on one submit. Say for example i have number of records on a html table, user performs changes on some of the records, and hits the submit button at the end and all these value have to be updated into the sql query.
View Replies View RelatedIm having a hared time with this, im trying to update multiple records in a database from a form.
The form display all records from a search query and then the user selects whether to post the record of put the record on hold (two fields in the database).
Now everywhere I have looked I only see examples which update the records by using counts but I could end up with any number of records. I thought that using a loop would be an idea to get passed this.
How do I update multiple records in a table in ASP using loops ? For example.
I have a table with the following colums
ID | Col1 | Col2
-------------------------
1 | 50 | 100
2 | 25 | 130
3 | 55 | 70
I want to add *66* and *77* into the ID # *1* and ID # *3*
respectively. So the result should be
ID | Col1 | Col2
-------------------------
1 | 116 | 177
2 | 25 | 130
3 | 121 | 147
Note: All datatype of the colums are integer.
I'm trying to set up a form whereby users can select a variety of different subject mailing lists they'd like to be added to.
Each subject is in a different table so I want the FROM part of my SQL statement to loop through the values selected from the list box which I've loaded into an array.
But I'm getting a Type mismatch error.Code:
Dim strSQL
Dim subjects
Dim subjArray
Dim iLoop
subjects = Request.Form("subjects")
subjArray = split(subjects)
strSQL = "SELECT firstName, lastName, address1, address2, city, state, pcode, country, email FROM"
For iLoop = LBound(subjArray) to UBound(subjArray)
subjArray(iLoop)
Does anyone know how to upload or insert multiple records into a MS Database. I've been trying to figure this out all day with little success. It seems that their should be a way to upload a txt file or csv file and have all the records go into the dbase.
View Replies View Relatedhow can update the multiple records at a time ? what loop will use to update the multiple records ? Code:
View Replies View RelatedHow can I go about updating multiple records or deleting multiple records
from a DB at a time?
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations.
Example:
Employee1 TeamScore(1-10)
Employee2 TeamScore(1-10)
Employee3 TeamScore(1-10)
Employee4 TeamScore(1-10)
Then I submit this page with all the values in TeamScore for every employee and I want to perform a calculation based on the values in the drop-down and a weighted score from another database table. An example of a weighted score is 0.11 and I need to multiply the value(from 1 to 10) times the weighted score of 0.11 for each employee.
I have several records to update all at once from the previous screen of drop-down boxes containing numbers 1 - 10 and I want to take each individual drop-down value and multiply it by a weighted score (i.e. 0.11 etc.) Code:
i've created a page that displays a list of records with a checkbox next to each.
I'd like to give my users the option of selecting multiple checkboxes then clicking submit which will insert a new record for each of the checked option.
for example: Code:
I have created a page that calls multiple records from an access database. I would like for the user to go through and update the data, press update and it updates to the database and returns to the same page.
this has been accomplished all bar one thing, it doesn’t update the database! What have I missed? Code:
I have a recordset that contains multiple records of product a user is purchasing. For clarity, I converted the recordset fields to variables. I need to take that entire recordset and insert it into another table on a remote server. The below code only inserts 1 record. How do I change the code to get all records inserted?
<%
Dim DataConn2
Set DataConn2 = Server.CreateObject("ADODB.Connection")
DataConn2.Open MM_kasKSS_STRING
SQL = "INSERT INTO wsOrderDetails (OrderID, OrderNo, Description, Qty,
PriceEach, Priceline) "
SQL = SQL & "Values ('" & iod_OrderID & "', '" & iod_OrderNo & "', '" &
iod_Description & "', " & iod_Qty & ", " & iod_PriceEach & ", " &
iod_Priceline & ")"
DataConn2.Execute(SQL)
%>
I have a master/detail table configuration in a SQL database.Each record in the master table can have many records, which are stored in the details table.I need to create an update page that will allow the user to view, update or add new records within the details table that is associated to a master table record.
So, say I have 7 fields in the detail table and I'm pulling 20 records from the table that is associated to a specific master record. I would have 20 rows each with 7 columns that need to be updated or added to.
The columns contain dropdown menus,which will hold the value from each field in the detail table But,I also need to pull data from other tables that will hold the other values for the dropdown menus.
I want to select multiple records using the WHERE function. Currently my SQL query is as below:-
strSQL = "SELECT albums.* FROM albums WHERE id = 1"
As well as selecting id = 1, I would like to select id = 2 and id = 3 . How can I write this? I have tried seperating it by commas and spaces but this didn't work.