I have an .asp page with a form to copy job responsibilites form one job to another. It is a hotmail type interface with checkboxes besides each responsibility. After submitting, it should copy the selected resp's to a different job. After that it should renumber that job's responsibilities.
This is the code I am using now to copy:
copySQL4 = "INSERT INTO jambue.RESP(POSCODE,IDCODE1,IDCODE2,RESP_NUM,RESP) SELECT '" & id & "' POSCODE,'" & dept & "' IDCODE1,'" & unit & "' IDCODE2, '999' RESP_NUM, RESP FROM jambue.RESP WHERE (POSCODE = '" & POSCODE & "' AND IDCODE1 = '" & sourceDept & "' AND IDCODE2 = '" & sourceUnit & "') AND RESP_NUM IN (" & Request.Form("chk") & ")"
As you can see the value '999' is hardcoded in there as the new Responsibility Number to go with the copied responsibility. I use this because there are no jobs with that many responsibilities. This works fine if I only select one resp. to copy over. But if I select more than one that part still runs fine but I get an error with the below. It says too many rows would be affected. Of course, this must be because there are now at least 2 responsibilites with the same RESP_NUM. Code:
Just as the title says I am trying to do something impossible with a single SQL statement. I am doing an ASP webpage for internal use at the company I work for.
I want to know if there is a way to insert/update data into multiple tables in 1 SQL statement.
If it requires functions | views or anything else that is fine but I don't want to have 3-4 different SQL statements to update 2-3 different columns in different tables.
Is it possible to insert values in a Database with a checkbox? Say I have a recordset and if the check box is checked I want to insert the value of the of the field in the DB.
<%=rsqa.Fields.Item("recini").Value%>
That is a persons initials, i want to insert those initials in a column if it is checked, if it isnt checked nothing is inserted..
what Im trying to do is to insert into the database the values of the checked checkboxes of the recordset fields the appear in the table I've written the following code:
I have a form that is passing a number to check box values with the same name (productID) but different values (numerical values). It is also passing a warehouseID as a hidden field.
I need to dump these values into an access table called wtbProductWarehouses with fields titled ProductID and WarehouseID. What is the code that I need to write to have it loop through all of the productID values and individually add each one to the db while also adding the warehouseID with it.
I am having problems inserting checkbox data into my database. The string data from the text files in my form have no problems being inserted in the db. Code:
I have a form that if a user selects a certain option from a dropdown list a checkbox will appear. This checkbox references information from another table and then multiplies a figure before it is submitted (well, that's the theory anyway!)
I can't seem to get the multiplier to work. Can someone please give me some advice to this? I've included some simplified code that concentrates on the areas that I'm having difficulty. Code:
A page displays the Product literature that a customer can request to receive by postal mail by clicking a check box. The literature selections are created by a dynamic record set based upon what the company enters into the Literature table (currently 10 selections). The checkbox form tags are:
LiteratureID is the Access autonumber primary key field. I can use the LiteratureName in the "name" attribute if it is easier.
The form processing page needs to Insert each selection into its own record in another table. This "requested" table also inserts the database ID for the customer that is created after first inserting the customer contact info. In other words the "requested" table needs to record the customer autonumbered db ID and each selected checkbox value.
but I only get a value passed to the database if just one is selected. If more than one is selected, no value is returned. I thought the value passed was s'posed to be a comma delimited string of all checked boxes?
There are a lot of references on the net on how to delete multiple entries in a database by using a checkbox. What I would like to do is add a checkbox to the output of a query (ie. bunch of names).
Then be able to select some of the names by clicking on a checkbox and when submitted, add those checked names to another database (insert). Similar to a shopping cart selecting multiple products but when submitted, it does not add them to the checkout, it adds them to a database as new inserts.
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 have an ASP script which is used to upload files with Persits.Upload.1 object. But I can't get the values from mutliple checkboxes in the form like normally.
I am using a form to upload images with Persits.Upload object. Now my problem is I cant use multiple checkboxes in the form.
In general forms I can use Form("checkboxName").Count to get the number of checkboxes selected and use Form("checkboxName")(i) to retrieve the value of each check box.
This is my code, for some reason, when I use this exact code it doesn't update my database, but if I use the next section of code it does. Anybody knows why that when I use two different "Insert" in If Then End If, it doesn't work? Oh and I did try the "If PID = 105 OR 151 Then" alone and it works well. Code:
I hv a SQL server table 'spmidishad'. Theere are 7 columns. One of it is Partner. my searchresults.asp displays all the records retrived from my database (spmidishad). At the end of one row, there is a checkbox. Once a few is checked, i will press on the IMPORT button. This import button (the form action is from import.asp) is to import (insert) all the checked records into the database.. All rows inserted (the data) are the same except for the Partner column.Well, i want someone who can help me to figure out how I am suppose to do this..?
I have a page that will populate information from a "reference" table in the DB (SQL) like this:
sku qty 123 10 111 10 222 10 333 10
This information will be different each time the page is visited based on the variable they submit. So next time it may show 20 records. how would I go about inserting this data to the DB? Can anyone point me in the right direction to get me started?
I'm trying to make a form that allows the user to select multiple files from their computer, and then INSERTS those file names into an access database using ASP. I also don't want to have a seperate <input = file> tag for each one??? Is this possible?
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:
I've a multiple checkboxes and would like to insert those values into the db. How can we insert all those checkboxes’ values into 1 field (DB), we use a stored procedure. This is urgent
i want to insert some records to Access Database using the checkbox.i've try all the example i've found but it does't work.it's like checking our yahoomail.but i want all the tick checkbox insert to database
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?
I use Access Data Base 2000 and ASP configuration. My case is that I constructed a Editable Grid with 5 columnar labels so that I derive many rows from database for the client to choose from by the help of check boxes that I externally added for each row. What I have to do is after client chooses the rows by clicking the check boxes and then clicking on the submit button.
I would like to insert the marked rows with labels(4 or 5 labels)into a differant database table from the one where the data was first drived. BTW, within the editable grid I have 4 submit buttons and each button should insert checked rows into differant data base tables.
After the page (transactions.asp) loads I want to allow the user to enter the number of transactions into the provided textboxes. Then, when the user clicks submit, I need to have all the hidden fields as well as the number of transactions values inserted into the transactions table of my database?
I have attached the database should you have any questions about the db table values and fields. Please let me know if you have any questions or need more information or files.
my page(searchresults.asp) will show all the results that you searched for.. These results are from the sql server. All the datas are different. On the right of every record, there is a checkbox.
Now is the scenario..
After all records are shown, I will check a few checkboxes. Then i will click the button. All the data that is checked will be inserted in the sql server. But the thing is that all data records is different..
Its actually kinda off like the hotmail, where you checked a few boxes and put them into a different folder..
how to insert multiple records in database?? i have this problem like i have this one form and there are three fields like the (quantity,unit,item name)..the item that will be inputted will vary, depending on the number of item to be inputted..
Ex. enter the number of item: 3 qty unit item_name 1. 2 pcs pencil 2. 2 pcs glue stick 3. 2 pcs clip (SUMBIT)
what should i do in order that these items will be inserted in just one insert statement?
I have 6 textboxes where user can input data (or can leave it blank). I need to insert all the data (if not blank) into the database. How should be SQL query be like? ...