Trouble Adding Values From 2 Recordsets

I have the following snipet that I want to add two values from a recordset together.
sLoss = the running total for all records. totLoss = the total for this particular record.
PHP Code:

sLoss = sLoss + rs.fields.getValue("sLOSS") + rs2.fields.getValue("LOSS")

totLoss = rs.fields.getValue("sLOSS") + rs2.fields.getValue("LOSS")

Response.write totLoss 

I keep getting the following error: PHP Code:

Microsoft VBScript runtime error '800a000d' 

Type mismatch: '[string: ""]' 

/asp/report/cost.asp, line 527 

How come I am having trouble adding these values?

View Replies


ADVERTISEMENT

ASP Adding Possible Nulls In Recordsets??

The following code is adding three recordset values and printing the totals, however! as there is a null in the jan recordset it brings back an error syaing formatnumber mismatch.

Here is the code:

<% if rsnoventerprise("unix")<>"" or rsdecenterprise("unix")<>"" or rsjanenterprise("unix")<>"" or rsnoventerprise("unix")<>"0" or rsdecenterprise("unix")<>"0" or rsjanenterprise("unix")<>"0"
then%><%unixentq1=formatnumber(clng(rsnoventerprise("unix"))+(rsdecenterprise("unix")+rsjanenterprise("unix"), 0)%>

$<%=unixentq1%>k<%else%>0k<%end if%>

View Replies View Related

Adding Up Values

i have a page that enters numbers stored in different values e.g monday tuesday wednesday thursday friday into a database. is it possible in asp to add those values up and store the added up value in a seperate field in the database
bascially
total =monday+tuesday+wednesday+thursday+friday
How would i do that in asp.

View Replies View Related

Adding Values Together

i am trying to add to values togher but each time i try it dont work.

for example

when i try to add 7 and 3 i get 73 and not i want what is 10

i am using the below code

money=RS2("bank")
RS2("bank")=money + pay
response.Write("money="&rs2("bank"))

The DB code is fine as it is recording and pulling the data of te Database but i cant add them up only togher.

View Replies View Related

Adding Checkbox Values

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

Adding Values In A Column

I was hoping that someone could help me in getting the sum of a column(item_amount). The table is populated through a repeating loop with information pulled from a database. Code:

View Replies View Related

Adding Values In A Column

I have searched the forums and can't seem to find out how to do this. I have a set of values in a column in a database, I want to add all those values up then display them.

View Replies View Related

Adding Checkbox Values

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

Adding Up Values From A Database

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

Adding Values From Records

I want to add intQuantity of all records that have the same prodID. I have tried all sort of variations but I don't seem to get it. I would imagine that it must be simple, that's why I can't get it.

SELECT SUM ( intQuantity) AS ItemTotal
FROM tblOrders
WHERE prodID = ? no clue

Or can I do that in ASP? doing something like (my example doen't work)

<%= (rsOrders("intQuantity") + rsOrders("intQuantity")) %>

in the mean time I'll be looking around for an answer to my lack of know how.

View Replies View Related

Adding Values From A Submitted Form

I am trying to total the value of some form fields I am referecing the form
field with an inner loop, I am having a little trouble because the amount of
fields returned is always different, how can I roll-up the total of the form
fields (request.form("subtotal_"& i)) to get one final figure? Code:

View Replies View Related

Adding Values To A Dynamic Jump Menu

I've writen the code below which displays a drop down select menu and can be displayed by writing the variable 'sjobs'. The code works fine as it is and the menu is populated with the requested info from the database ok. The problem I'm having is adding url links to the menu values. Code:

View Replies View Related

XML Trouble

I was wondering If there is any way to grab just the viewable text of a webpage
using xml. Not the html, just what the user can see.

View Replies View Related

IIS Trouble

I am having trouble with installing IIS, I tried to do it in my control panel, but it wants the disk, I don't have the disk because my computer came with Windows XP Pro 2002 Service pack 2.

so I went to the microsoft website and downloaded the free download of IIS6. Then when I go to my control panel and Administrative tools it is in there and when I click on it, there is no computer name available.

View Replies View Related

Iframe Trouble

I have a sign-in box that is an IFrame, with a form target of "_top", and
the current (parent) page URL as a hidden field.

If sign-in in successful, there is a response.redirect to the page URL,
having set the session variable LoggedInOK=true.

However, if the sign in is not OK, I want the IFrame to be the target, (i.e.
_self, not _top) to display the error.

Is there a way for ASP to control whether it redirects to _top or _self, as
setting the form target in the Login page requires "pre-knowledge" of
whether it will be successful.

View Replies View Related

Trouble To Migrate To IIS 6

I am moving a ASP website to a new Window 2003 server with
IIS 6, but an error occur for the metadata declaration in
my global.asa

<!--METADATA TYPE="TypeLib" NAME="Microsoft Scripting
Runtime" UUID="{420B2830-E718-11CF-893D-00A0C9054228}"
VERSION="1.0"-->

the error message is

Active Server Pages error 'ASP 0223'

TypeLib Not Found

/LM/W3SVC/1/Root/myweb/global.asa, line 4

METADATA tag contains a Type Library specification that
does not match any Registry entry.

View Replies View Related

Trouble W/ Checkboxes

I'm writing an Online registration system for my friends new business.
I'm trying to incorporate checkboxes so when a person checks on 3 or 4 checkboxes and hits the Submit button I can
pass the information of what they checked_on to a new page.
When I get to the new page I would like to update a database, based on what they checked_on on the previous page.
I'm not sure how to do this.
I'm not sure how to pass the information.

View Replies View Related

Recordset Trouble

Ive got a script here that searches using info from querystrings. it's just a snippet from the other lot. Code:

View Replies View Related

Cpshost.dll Trouble

using PWS on test machine (NT4 workstation SP6) and everything was fine but cpshost.dll was used in the website we're maintaining, so I idiotically installed it from a Visual J++ disc. now the website works fine but when i navigate to 127.0.0.1 nothings happens. I've checked directory browsing is enabled but still nothing happens!

I'm aware that cpshost.dll was never meant to be used on NT workstations but as I said before the upload functionality works fine, it just seems to have screwed the directory browsing up - and also the code document.referrer equals nothing.

View Replies View Related

Trouble With Rss2html.asp

I am primarily a front-end designer and not familiar with ASP beyond
breaking up pages into include files. Recently, one of my freelance
clients wanted to display an RSS feed from his blog on his site. I did
some research and found the rss2html.asp script. I chose this over a
javascript solution because those scripts apparently don't affect
search engine rankings.

I implemented the script and it was running fine until about a month
ago, when the site and sometimes the server running it started to
crash. The ISP and the blog company the RSS feed originates from blame
the script. Bytescout, who wrote the script, says that it's probably
the feed that's causing the problem. The RDF version of the feed
validates as RSS, but the ATOM one has specs that are too new for the
validator to parse correctly. Code:

View Replies View Related

Connection Trouble

I keep having trouble connecting to my database I am running windows xp pro and Access 2000

Error Type:
Provider (0x80004005)
Unspecified error
/test.asp, line 60

It keeps bringing up the above error message sometimes it works fine then other times it dosen't has anyone had any similar problems.

View Replies View Related

Interesting Trouble

i'm working on access db the problem is when i enter date in d/m/y format it wrote db m/d/y format but this happens only with small numbers i.e if date 04/09/2002 it become 09/04/2002 in db but if it is 24/09/2002 there is no problem.

View Replies View Related

Function Trouble

I've narrowed down my error to one particular function. It looks as if the function may not be receiving the variable that is passed to it.

The error message is:

error '80020009'
results.asp, line 21

Line 21 is: Code:

View Replies View Related

ASP XML SelectSingleNode Trouble

I'm having some trouble parsing an XML document I'm getting from my company's bank in response to a XML document I'm sending. Both docs are transferring fine, and in fact if the transaction in the document I send is accepted (valid credit card), everything parses perfectly.

The prob is when the transaction is not accepted by the bank server (invalid credit card), and the document that's returned to me has different tags. Code:

View Replies View Related

Trouble Inserting A New Row Into Database

I am having trouble with someone else's code that worked when it was used last, but now it's not. I am new to ASP programming so I not too sure what's happening. Code:

View Replies View Related

Trouble With Session In Global.asa

I have started session("visitorID") in global.asa in order
to keep track of how many users are on our site at any
given time, trouble is I can't seem to call the session
while on another page.

As I am relatively new to asp I'll post both the setting
of the session and the call to it on the other page below Code:

View Replies View Related

Trouble Passing A URL Through From An Access DB

I am attempting to pull a value from my database and insert it into an ahref tag.

However I keep getting the following error..

Microsoft VBScript runtime error '800a01a8'
Object required: ''

Below is the code I am trying to make work..

<th width="25%" height="34" scope="col"><div align="center"><a href="cat_detail.asp?<%=(rsLastCatalogUrl.Fields.Item("txtCatalogUrl").Value)%>"><img src="../../../images/layout/buttons/button_backtocatalog_off.gif" width="100" height="30" border="0" /></a></div></th>

This is the SQL statement I am executing to pull the field, which is meant to be the last record inserted into the shopping cart by a particular individual. Code:

View Replies View Related

File Uploader Trouble

I am having trouble with my file uploader. I do not program a lot of .asp and its a bit confusing. As well, I just took over the development on this webpage so the code is not my own.

The file uploader worked before but now that I have the webpage put to a test site it doesn't. Would this be a reason why I cannot upload? i am also having trouble accessing the database, which makes it even harder for me to see whats hapening to the file.

When I upload it says that it uploaded successfully but when I see the webpage the photo isn't there. Would you like to see the code for the uploader?

View Replies View Related

Trouble Deleting Records Via SQL

I have this list of records (from an Access DB) and would like to use check boxes to delete 1 or many records. I think there is something wrong with the SQL though, cause the records are not deleting when the form is submited. Code:

View Replies View Related

Having Trouble Breaking Loop

I'm trying to break this loop for 4 different contacts to be inserted into the system.

For new inspections I want to be able to search the DB for the Owner, User, Contractor, and Cert_Recipient for new boilers the certificate will be mailed to the contractor which will be the Cert_recipient first.

then for annual inspections I want to be able to search for Owner, user, and Cert_Recipient for annual inspections I will have to search the DB for either the owner or User as the Cert_Recipient

For some apparent reason I can't stop the search, it keeps going thru the loop. I must be missing something. Code:

View Replies View Related

Dynamic SQL Query Trouble

ive been trying this for ages and various ways have all failed! please can some one show me the correct way to achive what i am after!

the ASP code looks like this: PHP Code:

View Replies View Related

Trouble Reading From TextArea In ASP

I am trying to put together a little ASP page that lets you paste a block of HTML in a text area then, at the click of a button, convert it to Javascript document.write statements (including any concatenation, switching of single and double quotes). A really useful tool! Code:

View Replies View Related

Array Trouble In IE & Firefox

I recently started testing my work in Firefox and noticed that when I am looping through an array where I say for example: Code:

for i=0 to ubound(myarray)-1

--work with the array values here--

next

I get the following results:
Firefox works with all items in the array EXCEPT the last one
IE works with the entire array.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved