Is It Possible To Insert All Checkbox Values Into 1 Field In The SQL Database?
Is it possible to insert more than 2 checkbox values into 1 field in the SQL database?
I have 5 checkboxes; I would like to insert them all into 1 column in the SQL DB.
If I insert more than 2, it gives an error.
View Replies
ADVERTISEMENT
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:
<input type="checkbox" name="LiteratureID" value="<%= rs("LiteratureID")%>">
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.
Here is my current code:
View Replies
View Related
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:
View Replies
View Related
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:
View Replies
View Related
I'm trying to insert this text into a memo field:
Set cnn = CreateObject("ADODB.Connection")
str = Server.MapPath("database/alumni.mdb")
strDB = "Provider=MICROSOFT.JET.OLEDB.4.0;Data Source=" & str
cnn.Open strDB
Set rst = CreateObject("ADODB.Recordset")
sql = "INSERT INTO tblMessage (MessageID, UserID, PostTypeID, Subject,
DatePosted, MessageText, Active) Values ('" & vMessageID & "','" &
vUser & "', " & vPostType & ",'" & vSubject & "','" & vDatePosted &
"','" & vMessageText & "',0)"
rst.Open sql, cnn, adOpenStatic, adLockOptimistic
vMessageText = "This is a test just to see if it will blow up on a
large comment. Just testing again. Don't mind me."
Can I put this into my database field or is it too much and if not,
how do I solve this issue. I need to be able to post messages and
input for large fields.
View Replies
View Related
How to prevent duplicate values when using BULK INSERT to insert CSV to SQL Server? Code:
View Replies
View Related
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..
View Replies
View Related
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.
View Replies
View Related
This is my problem... its for a mailing list with categories...
I have 3 table...
1 : Name,City,Email
2 : Categorie
3 : Name_id , Categorie_id
So when a user fill up the mailing list form, he can check as many categorie he want...
but how i can insert 1 row in my table #3 for each checkbox checked...
Can someone post me a simple script...
View Replies
View Related
I have a page with a checkbox on it (chkMyBox). I want to be able to click on it and redirect the page back to itself, showing the box checked when it resubmitts. How can I do this?
View Replies
View Related
I need to get the values of a number of checkboxes without A) Resorting to calling them all the same thing and using the below to sort it out: Code:
ValueA = Split(Request.Form("a"),",")
For i = 0 to uBound(ValueA)
response.write(i)
Response.Write(trim(valueA(i)))
Next
or
B) Having a request.Form for each one (There could be in excess of 40 checkboxes; the number changes).
View Replies
View Related
I am trying to create a 'build a quote' page in which a user can checkoff checkboxes and have the total add up once the submit button is clicked. An example of the code I am using is
<form action="add.asp" method="POST">
option 1 value is 5<input name=""check"" type="checkbox" value="5"><br>
option 2 value is 9<input name=""check"" type="checkbox" value="9"><br>
option 3 value is 1<input name=""check"" type="checkbox" value="1"><br>
option 4 value is 2<input name=""check"" type="checkbox" value="2"><BR><BR>
<input name=""Submit"" type="submit"> <input type="reset" value="Reset">
</form>
<hr>
<%
arrB = Request.Form("check")
arrA = split(Request.Form("check"), ", ")
If arrB<>"" then
For each x in arrA
total = x
next
response.write(total)
end if
%>
View Replies
View Related
im not that good at asp, infact im using dreamweaver to make my pages up! what i would like to do is show a list of items and price in a table, with a checkbox next to them, the form is submitted and then on the next page i would like to display the the items that have been checked.
I think i have the first page sorted, i have linked the checkbox to the product ID value in the database, so i can pass that value to the next page. the problem is the second page, i can get it to show the values of the checkbox (eg items 1, 4 ,26...) but only the numbers.How do i go about using this value (number) to pull the rest of the data from the table (stored in a mdb)?
im using this in the first page form to pass the checkbox value
<input type="checkbox" name="checkbox" value="<%=(rs_stock.Fields.Item("ID").Value)%>">
on the second page i get the values get shown with
<%= Request.Form("checkbox") %>
im at a loss on how to do this
View Replies
View Related
I have 2 pages - form.asp and result.asp. in form.asp, i have multiple checkboxes with varying values, like:
<html>
<body>
<form action="result.asp" method="get" name="form">
Name1: <input type="checkbox" name="1" value="5">
Name2: <input type="checkbox" name="12" value="7">
Name3: <input type="checkbox" name="12" value="9">
Name4: <input type="checkbox" name="12" value="11">
<input type="submit" name="submit">
</form>
</html>
I seek to capture these values and add them up in the result.asp page. e.g. if name1 and name3 are selected, i want the total of 14 to be shown up in result.asp page. I need help here for the asp code for the above. Or, may be some advice on how the above can be accomplished.
View Replies
View Related
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:
View Replies
View Related
I am trying to Send the values of checkboxes to the user's email
and display in the form of List <li></li>. The values of checkboxes
are sourced from a table in my access DB. I am using Jmail to send
this info. Can anyone please help me how to retrive values from the
check boxes, split, make a list and send in the body of e-mail.
Here is wht I 've done so far :
uname = Request.Form("name")
uemail = Request.Form("email")
chk = Request.Form("checkbox")
chk = Replace(chk,",","<br>")
chk = " " & chk
mailserver = "my.mailserver.net"
recipent = uemail
msg = "<html><body> Dear " & uname & ",<br>Thank for requesting our product list." &_
"<br>This is what u requested : <br>" & swnp & "</body></html>"
Set Mail = Server.CreateObject ("JMail.SMTPMail")
Mail.ServerAddress = mailserver
Mail.Sender = "email@mydomain.net"
Mail.Subject = "Your Request"
Mail.AddRecipient recipent
Mail.Body = msg
Mail.Execute
View Replies
View Related
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:
View Replies
View Related
i have a checkbox Code:
<input class="txtbox" type="checkbox" name="C1" value="ON">
it will correspond to a field in my ms access database that has a Yes/No data type. when the box is ticked, i would simply like the value Yes to be entered into the database..
i enter other elements of my form (a input text box for example) using Code:
rsAddComments.Fields("area") = Request.Form("area")
so what would the entry code look like similar to this.. and what would the for checkbox code look like?
View Replies
View Related
I have a form which the user fills and submits.i have insert statement there.
When i submit the form to itself ,the values get submitted and inserted in DB easily.
<form method="post" action="Infoviewagentver212.asp" name="form">
Now when i want the user to hit submit and go to other page i change the above to:
<form method="post" action="newpage.asp" name="form">
but here what happens is my values are not getting inserted in the DB??
How do i do this?
View Replies
View Related
Iam trying to insert values into my database, but i keep on getting this error, Code:
Subscript out of range: '[number: 1]'
I have tried to check my insert values but i can't pickup anything, can anyone assist me in this regard. Here is the portion of the code:
View Replies
View Related
I cant figure out how to insert a string variable in a string. My SQL query should select the top x posts. So I need something like
Set x = Request.Querystring("x")
strSQL = "SELECT TOP "+ x + " FROM myTable;"
help me with the syntax?
View Replies
View Related
I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.
(The hidden value (1 for example) would then automatically get passed to the
other input field.)
The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:
View Replies
View Related
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
View Replies
View Related
Here's the link for the db table:
http://k.domaindlx.com/gemetria/pageing.asp
How do I insert a field of values?
View Replies
View Related
How to insert fields in a table by using SQL?
View Replies
View Related
i'm reading in a .csv file and then inserting the data into a mssql db. batchid sometimes shows up blank. the values that are disappearing begin with the letter "N", such as "NP2338" or "N00312". outside of those that begin with "N", the rest are a five digit number. the table field is varchar. why is it dropping those that begin with "N"?
View Replies
View Related
I have an INSERT statement with information being pulled(upload.form) from the form. Example, text field named SubmitIssue1 will populate field SubmitIssue field in the database. SubmitDate1 will populate field SubmitDate1, and so on. However, what I am trying to accomplish is to expand the form to allow the user the ability to add another instance of an issue where they will use the SubmitIssue2 text area.
I want to pull their name and email address from the top of the form and use it as well as this new information in the SubmitIssue2 textbox to create a new record. The information from SubmitIssue2 will populate the SubmitIssue field. HOW CAN THIS BE DONE? Please help with some examples of how this would look. Code:
View Replies
View Related
I have a field called w. The data type of the field is number. I use Access database. I cannot update a null value in the field.
r3("w")="5"
r3.update
View Replies
View Related
I have problem to insert a record contains a blob field . Everything fine except the blod field . Platform :VStudio 2003, database :Firebird.net 1.5
View Replies
View Related
I have a database which contains a field called hide which is a yes/no data type. I have an edit record page which is populated with all the data from the database which can then be changed and updated back to the database. What I am trying to do is set the checkbox based on the value in the database . i.e. if hide = true then set checkbox to true.
View Replies
View Related
I want to use field values outside a recordset. When is use "set speler8 = rs.fields("naam").value" I get an "Microsoft VBScript runtime error '800a01a8' Object required: '[string: "John Doe"]'. I can't find the info to resolve it anywhere. Can someone help, it's probably verry easy, but I don't know it.
View Replies
View Related
I have this page set up at www.kevinhall.org/headcount/headcount.asp
what is the easiest way to check where the user has entered a value
and submit the row to the db. Maybe i'm going about the form wrong.
Each box has its one name but I was hoping i could get around using a
request.form on each one and useing the isEmpty. Its so tedious and
non efficient there has to be an easier way.. Maybe with .net possibly?
View Replies
View Related
i have list of items as a list.Now user can select any item in that list. Now what i do is create checkboxes to enable user to check the item which has to be selected.
1. Checkboxes are dynamic.
2. I create checkboxes with one name assign value = Itemcode value so that when form is submitted i can get the itemcode value as a comma seperated list and which would be easy for me to put it in a database query.
3. the part i have problem is i have to display those checkboxes ticked back to user , ie after form submit i have to make the checkbox which are previously checked, to be in checked state.
request.form("Chkgroup")="1,4,5,6,9,10"
assume this is an arrray i am getting from form element.what is the easiest and efficient method so that i can make those checkbox checked again.
View Replies
View Related