Adding Multiple Fields
how do i add afew items into a database of only a field name?
for example if there is only item_1.. it will add item_1 only. but if there is item_1 & item_2. how do i add them to the database name ("Items No")?
how do i add afew items into a database of only a field name?
for example if there is only item_1.. it will add item_1 only. but if there is item_1 & item_2. how do i add them to the database name ("Items No")?
I have a search option on my website, which should perform a search on 4 fields, as follows:
tblNews
headline
content
tblDatabank
filename
description
It only needs to return matches which are an exact match of their search criteria. For instance, searching for "I am here" would return a record which contained "I am here", but not just "I" or "I am" etc.
I need to return all these records as part of one recordset preferably, as I want to be able to order them etc., though I imagine you may suggest I use an array somehow to merge two recordets etc., then reorder them?
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
Suggestions?
I am requesting cost information from three databses and trying to add them together using asp but I am having problems.
totalCost = data01("cost") + data02("cost") + data03("cost")
when I try to display totalCost <% =totalCost %> it comes out as 5.005.005.00 just joining them together not adding then together I tried formating the data using formatNumber() but that didn't work either. If anyone could point out to me what I'm doing wrong.
I found a recordpaging script that works fine except when I try to add additional fields. This script came with 3 field and 3 headings.
Adding addtional headings are easy but when I tried to add addtional fields, I don't get an error just a page with 5 headings and 3 fields. Take a look at the file an it's .inc file attached. I can't see where the field is referrenced from.
What I am looking to do is dynamically add an amount of text boxes depending on a user's choice on a static textbox. (when a listbox entry has been entered a number of textboxes would appear).
I have been deliberating this problem for a while and the best I got was to produce ascx files for each scenario, and use if statements for each user choice. The choice would initiate the number of textboxes for that given choice.
I have 2 time fields like this:
time1="00:20:23.36"
time2="00:22:20.20"
and the result when added shud be
total time:"00:42:43.56"
I want to add these 2 TIMES.I retreive this information from a form.Any kind of information about adding these 2 date fields will be too helpful.I'm storing this in an Access DataBase.
is it possible to dynamically add a field into a table? or add a table? Lets just say that I have a DB with 10,000 entries and about 5MB in size. I want to add a new feature and for this i need to add an extra field to the table. I don't want to d/l the DB, make the changes locally and then u/l again, so can I do it via script?
View Replies View RelatedThis code has worked in the past on this same page, and for some reason it doesn't want to calculate the numbers anymore. Anyone see anything that is out of whack?
Basically I am taking the input numbers for each field and adding them up on one column, then taking the totals of all of those columns and adding it up to display as an overall total. Code:
I have never programmed in ASP in fact I am not a programmer at all. I found this script that sends an email that pulls information from a contact form.
'Sends an email
Dim mail
Set mail = Server.CreateObject("CDO.Message")
mail.To = "youremail@yahoo.com"
mail.From = Request.Form("your_email")
mail.Subject = "Contacts"
mail.TextBody = Request.Form("your_message")
mail.Send()
Response.Write("Thank you for visiting!")
Destroy the mail object!
Set mail = nothing
I got it to work with my flash contact form however on the form I have two other fields. Name and Phone number that I want to tack onto the TextBody but I do not know how to do this.
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 have an instance where I need to add records to 2 different tables. i know how to do it basically, but the problem is, one table is generating a key number and i need this number for the second table records.
how do i put the appropriate records into the first table, grab the id number and insert the records into the second number? the information is coming from a form. i'm developing in an access db but will be moving this to an ms sql db before it goes live.is there a stored procedure that might make this easier? i know nothing about stored procedures.
I need to set up my front end app to update multiple fields with the same entry. See below.
Database: Testing
Columns:
Recdte
Invdte
So in this case, the user would need to update the Invdte with the current date for all rows where the Recdte is a given value. I know how to do this in SQL but not in ASP.
how to inner join multiple fields.
I have 1 table SCHEMA1 wich contains:
id|wedstrijd|speler1|speler2|speler3|speler4
1 1 1 2 3 4
2 2 2 1 4 3
The other table SPELERS contains
id|speler|naam
1 1 Jan
2 2 Piet
3 3 Klaas
4 4 Henk
I would like to have te next result:
wedstrijd|speler1|speler2|speler3|speler4
1 jan piet klaas henk
2 piet jan henk klaas
Can anybody help, because i'm lost......?
Is it possible to do an update on a recordset like this?display all the fields in a form and let the user pick which ones to update? What happens if they pick, say, two of the total to update, and leave the rest of the form fields blank? Would that update the chosen records and leave the rest of them blank or null?
View Replies View RelatedI am struggling with how to allow users to modify the quantity of items in their cart. Right now they can only add 1 of each item. To add 2 of the same item they have to add it again which then just makes it so there are 2 seperate instances of that item in the cookie/cart. My hope is to show a text box with the value for each ID so they can modify that qty ID that way......
View Replies View RelatedI have 4 number fields in the same table and need to display the lowest number from all 4 fields, is this possible?
View Replies View RelatedI have 4 tables first table category (category_id and category name in it)
second table artist (artist_id, category_id, artistname in it)
third table album (id, artist_id, album_title in it)
forth table song (id, album_id, title in it)
I'm selecting category in first page
I'm selecting artist in second page
I'm selecting album in third page
I'm requesting, collecting and posting all id's to the next page.
this is the question!!
How can I read from database
1- category name when I was selected in first page
2- artist name when I was selected in second page
3- album name when I was selected in third page
I've got 4 records in my lovely database table. The table contains 5 fields, lets say: id, number, name, age and sex. All I want to do is to get all the values (form all 4 records) of the "number" field and put all 4 of the values in to one variable.
The output have to look something like this : numbers: 001, 002, 003, 004.
I tired, honestly, I really did. But didn't find a solution.
How to create multiple text fields and will be submit when press a "enter key" ...
View Replies View RelatedIs there any way that I can break up text in a text field to spread across multiple fields in an access database? I've got a FAQ section that I want admins to be able to edit via an online interface. Unfortunately, it often doesn't fit into the 255 character restriction that access has. Any ideas?
View Replies View RelatedI'm having trouble passing hidden fields between forms. I have a total of four forms. I have the 1st form passing its field to the 2nd form, and the 2nd form passing its field to the 3rd form, but the 1st form's field then is not passed into the 3rd form. So obviously, my summary form (the 4th form) is not getting the 1st form's field or the 2nd form's field, only the 3rd form's field. Code:
View Replies View RelatedI have multiple fields (BLM, WHM, RNG, MNK) each with a numeric value. How can I search across these fields for each record and find the highest number.
Example:
Name BLM WHM RNG MNK
----------------------------------
Jason 19 52 33 18
What I want it to do is return and display Jason WHM 52
And I want to do this for every record in the table.
I am using this script to submit my form fields into the body of my email:
***********************************************
Dim strBody
dim ix, formElementName, formElementValue
strBody = "Results of form submitted at " & Now() & vbCrLf & CrLf
For ix = 1 to Request.Form.Count
formElementName = Request.Form.Key(ix)
formElementValue = Request.Form.Item(ix)
strBody = strBody & (formElementName & ": " & formElementValue & vbCrLf)
Next
***********************************************
I'm completely new to vbscript and have been searching all over the net for an example of this script being used with mutliple fields with absolutely no luck.
The closest I've come to getting something back from this thing is when I tested the script with these elements:
FormElementName = Request.Form.Key("Name")
formElementValue = Request.Form.Item("Name")
formElementName = Request.Form.Key("Telephone")
formElementValue = Request.Form.Item("Telephone")
formElementName = Request.Form.Key("Email")
formElementValue = Request.Form.Item("Email")
Which produced this result:
Email: Email
Email: Email
Email: Email
Its seems the answer to my problem lies in defining the 'Key' and possibly the 'Item' parameters but I haven't been able to find any documentation on these terms. Can someone out there please save me from what probably is a very simple solution?
I have a form on one page where someone selects a bunch of options and details about a specific category. Then on the next page they fill out a form with contact information, name, address, email, etc.
Well what I want to know is when they click Submit on that contact form is there a way to have it so it goes through and searches the database for any that match the state and county(which they will select from a )??
So what I basically want right now is for the first form to be filled out, then the second form to be filled out, then when they are submitted it will go through the database and select everyone in there with that state and county, then on the next page display the results of both forms AND the matches in the db(obviously whatever fields I want it to display).
I already have both forms(basic html), I already have the dynamic dropdown for state and county(classic asp), what Im wondering is how do I put that dynamic dropdown in the contact form and then when submitted it will go through and search the db based on what was selected there. Would this be some sort of onClick for the submit button tellin it to search the db based on the dropdown or how would I get started on something like this?
There will be other information on the dropdown like name address email so one problem I was wondering about was my dropdown menu. When you select the state it refreshes the page and then loads the counties, so wouldnt that erase anything that was filled out on the form?
I could make it so they actually type the name of their state and county but that causes problems too because if they mispell either then it wont return any results.
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.
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.
I have a form on my asp page that sends data to an emailing script. I am working with other peoples code which is causing a lot of hassle. Is there any way of sending a Bcc address command from the form rather than the emailing script?
View Replies View RelatedI wanted to know how I should go about doing this. I have this query:
SQLmax="SELECT Max(OrderNumber) AS intTotal FROM Status"
Which gives the Max(OrderNumber).Say in this case it is giving out put as 37.
Now i want the output to be displayed 38,which can be done by adding 1 to Max(OrderNumber).
Should i get this by doing this way?
var=RS(intTotal)
var=var+1
Response.WRite var
Is this right?
Im using this code to pass a value to a variable:
<a href="Artists.asp?cat=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>"> <%=rsuser( "art_Artist" )%></a>
How do I add another value to this link with the variable name catArt so that I can add:
?catArt=<%=Server.URLEncode( rsuser( "art_Artist" ) )%>
what do you think is the best way to implement an "add new row to table" functionalilty?
am using asp(obviously )im currently using document.createElement with javascript, but im having a hard time retrieving the data.am also thinking if this is really the best way to do this.or if this would work with all other browsers other than IE...
how to add a password to using this connection string
<%
set conn = server.createobject ("ADODB.connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("dat48372.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
SQL = "SELECT Price FROM DABRadios WHERE (ID LIKE 6)"
rs.Open SQL, conn
showall=true
%>
i have a id1 field which has data like this 002,003,004 and i have to increment it by one when i add a new customer so this is what i do
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="Select Max(id1) from table2"
rs1.Open sql1, Conn ,2,2
maxid=rs1(0)
so i get the maxid for example as 003. the next record will be added and it should be 004 and i do it in this way maxid= maxid+1
but when the record is added the id1 field has a value of 4 instead of 004