Adding Database Fields And Displaying Them
This 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:
View Replies
ADVERTISEMENT
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?
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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")?
View Replies
View Related
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 Related
i run a classified ads site that allows people to post ads, and stores the results in a ms access database.
2 of the imput fields are: price and quantity
What i am trying to do is the following:
To add all the prices and and quantities together and be able to display the results on my site for example my database has the following:
Price | Quantity
2.00 | 300
1,50 | 1
10.00 | 10
140,00 | 7
and on the website i can display the results like so:
Current ads worth: 1681.50
I need the script to ignore letters as in the quantity field people have also added word such as packs and VE ETC so i need it to ignore letters, however in the price field some people have placed the ( , ) sign in there price so the code must recognize ( , and . )
View Replies
View Related
I have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).
I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?
View Replies
View Related
i need to find out how I can display fields with certain words in differnet parts of a page. For instance records that contain the word "enterprise" should be at the top, records that contain "Integrate" should be in the middle and so on. Unfortunately the records don't just contain those words....the title might be "Receive & Process Oral & Written Communication - Enterprise Skills Cluster". So I'm guessing I need to use some sort of wildcard statement like:
<% If rs("field") = "* enterprise *" then %>
I'm just not sure of the right syntax.
View Replies
View Related
I need to display multi-paragraph articles from a field in my database, but every time they display, they come up as one long paragraph with no line breaks, even though there are breaks within the database field.
I am using MS Access 2000 with field "data type" set to Memo and MM Dreamweaver UltraDev. What do I have to do to get the line breaks in the appropriate spots?
View Replies
View Related
I've run into this problem before and it's related to the order in which you select fields.but only when one is a text field.
Comes down to this,if you have multiple database fields being selected,either write your sql so that the text field is selected last yes, the right-most fieldname in the comma-delimited list OR you can use 'select *' in your queries as long as the text field(s) is/are the last/rightmost field in the table.
I've only run into this bug on ASP/MS Sql so I can't comment on other databases.
View Replies
View Related
I'm using an Access database and asp to bring in a series of table contents to textarea fields so if wording wants changing in the database I can do it using an asp form. All works ok apart from a couple of records that are memo fields.
I have displayed the field contents by ..........
<%=(locationwords.Fields.Item("ftexta").Value)%>
and they are shown ok.
If i try and use the same syntax for bringing the memo field in to a textarea nothing is displayed.
<textarea name="textarea" cols="50" rows="2"><%=(locationwords.Fields.Item("ftexta").Value)%></textarea>
Any clues as to what i'm missing to get the text to appear so it can be modified and posted using a form.
View Replies
View Related
Right now I think I've got the idea on how to work on ASP pages after such a hectic start, then I 've got a small problem . i have contructed my form but i can't seem to add to the dbase, i can fill the info but i see nothing on my dbase.
View Replies
View Related
I have been working on this form for a couple of weeks already but I keep running into errors after errors. Can someone try to test it on their computer and see if it works? My guess is that our server's setting is causing all these problems. All the files are uploaded.
View Replies
View Related
I am trying to run a script that will add users to a database so they can register with the site. ive got it working so that the users are added however i am trying to prevent people from registering the same username or email address and this is not working.
the script firstly checks that the user has filled out all the fields in the form from the previous page then the script is supposed to check the database for the username and email then adds the user if it is all ok however if the fields have all been filled out it simply adds the users anyway. here is one of the check scripts i am using VBscript and an access database .....
View Replies
View Related
I am trying to add entries in a database together and place the summed value into a text box. Like a total ordered type function for an ecommerce site. I have a field called ArmChairs in my database and based on how many people buy them, I want to know how many I need to have shipped.
I am really struggling with this last bit and would be really appreciative if someone has some code examples.
View Replies
View Related
i cant add a record to my access database! i think the code is right which i used asp script but then only blank record was added! It added a record but then no data in it! Code:
View Replies
View Related
I'm trying to add a record to an access database using asp. I create the database, the input form where i put the information, the asp code where i process the information and last the asp code to view the record added but when i press the submit button it show me a Downloading box for a downloaing process.
View Replies
View Related
I am trying to make a guestbook, wich should be accessable through a executable exe. I think, the easyest way to do this, is through your browser. I am looking how to add text to a database without entering text in a form, but only text in the address bar of your browser.
View Replies
View Related
I am trying to write a basic holiday booking system for the company I work for, it is quite simple in that the user selects the dates they want off work, and they can view if it has been approved or not. It has an admin screen so that the manager can go in and approve the holiday request.
To do this I would like the admin screen to display all the dates in the database that the user has selected off and to have a checkbox next to each that the manager can select to approve it. However I don't know how I would do this, at present all it does is read the info in the database. Code:
View Replies
View Related
how to accept ' or apostrophe when adding on the database? because I created a simple guestbook and when i tested it it works fine but once i add apostrophe like TOY'S etc it generates error.
View Replies
View Related
Except for extremely basic ASP programming that I did two years ago and have forgotten I have not touched coding since!
I've taken a look at a couple of tutorials but they all baffle me!
Can anyone tell me how I can just create a simple html form with input fields of FirstName, LastName, Email and Phone amd when the user hits submit it is recorded in an access database?
I can do the HTML part fine. And I believe I've set up access ok although Ive never used it before.
Also, if the server that the database will go on is a Microsoft one i suspect that is ok? Im not sure if all i have to do is upload the database and it will work? or do i need to talk to my hosting company to set up some kind of odbc thing that ive heard about?
My database will just be called clients.mdb and the table is called Customers.
View Replies
View Related
Basically i have a form on a HTML page which someone fills out with a few IDs, then i have a .asp file which is meant to add the info to a database.
However it just wont work, the field names in the database are correct. - i hope the if statement is correct too. Code:
View Replies
View Related
I have an array which I want to save into a database table I tried a few things but it doesn't work. This is as far as I got: Code:
View Replies
View Related
I want to add a row to library table. Table has total 7 fields. But I
want to create the new row with 5 field data. When I run the following query
in MS Access
strQ = "INSERT into library (index,title,author,itemtype,createdate) VALUES
('B-096','Hihihihihi','hello','Book','07/18/04')"
It successfully adds the row. But same thing I am trying with the following
ASP code. It gives error, saying syntax error in INSERT into statement. Code:
View Replies
View Related
I am looking for an ASP script that let me to serach all database contents with only one textfield in search page. eg: I have a database with five columns for lessons: Mat, physics, geography, history and sport. Each field have numbers 1 thr 5. I want to search only those students have number eg:3. with entering the number in textfield in serach page. I have no problem in result page.
View Replies
View Related
Is their a way to check with asp-code if a database field is relational with another field (from another table)?
For example:
If fieldname = relational Then...
End If
View Replies
View Related
I'm trying to set up a quick if/then/else statement for when the database field returns no results. I'm not getting an error but when the field is EMPTY it still executes the ELSE statement.
<%
If rsOffice("FloorPlan") = Empty Then
Response.Write ("Not Available")
Else
Response.Write ("<a href=" _
& rsOffice("FloorPlan") _
& ">View</a>")
End If
%>
View Replies
View Related
At the moment in time I have a product database being displayed. I could do with including another column to the database which allows me to enter a specific quantity for that product line. All the quantitys fields need to be calculated to their specific product cost value.
Finally all the sub totals need to be calculated together to give a grand total, which will be displayed on another page.
View Replies
View Related
how to compare one Database field against another which both have a date and time in them (DateTime format) using VB in WebMatrix. or just comparing Database fields of DateTime aginst each other in VB.
View Replies
View Related
actually, I have a problem while i want to add, delete, or edit a record to a database through a asp page, I can read well but when i want to submit changes using rds object , the data does not change on the source database,
I tried hard to get a solution but i think that the actual problem is only on one figure which is the server value of the data control when i use my own iis server, I do not know this value and microsoft is saying use an empty value but it does not work either.
View Replies
View Related