Calculating, Calling & Printing Return Values

I have a problem with returning a value from an external function.....

My asp page is basically a list taken from a database. A date record is written from the DB, then all the recordslinked to that date are listed, then the next date, then the next series of records, i.e. Code:

View Replies


ADVERTISEMENT

Return Multiple Values

At the moment, the function looks like this:

code:
public function fncGetPageContent(intSectionId_In)
set rsPageContent = connection.execute("SELECT TOP 1 * FROM sections WHERE section_id = " & intSectionId_In & ";")
if not rsPageContent.eof then
strSectionCopy = rsPageContent("section_copy")
strSectionTitle = rsPageContent("section_title")
end if
rsPageContent.close
set rsPageContent = nothing
end function

My question is, how do I call this function and return the two distinct values?

View Replies View Related

How To Return Values From A Response.redirect

I have a asp page which it post some values to an external web page (not
mine) with the method response.redirect

(http://www.website.com/page.asp?use...password=mypass)

The external web page response OK if the user exist and Error if the
user not exists.

How can I take this data to send it to my own pages somewhere?
After the response.redirect I lost control

View Replies View Related

JavaScript Return Values Accessible To ASP.NET

Is there an elegant way that I can return a value from a JavaScript function to ASP.NET? I want to have a popup confirmation dialog using JavaScript and only have a button control execute its ASP code if the confirmation is positive. I can associate the JavaScript with the button using the Attributes property and get the confirmation dialog to appear but the button control always executes.

View Replies View Related

Return 2 Access Field Values To Form REQUEST

I have a request form that is used for requesting copies og an edition of a magazine. What I need to do is get back the information, from a MS Access table, for the issuedate and deadline.

Because the deadline is not always the same number of days (ie dependant on issue it could be 14 days before, or 21 days before etc), so as well as picking the issue date from the table, I need to be able to get the deadline date back, and write to a seperate Request "field" on the Form. Code:

View Replies View Related

Calling SQL Records In ASP With Different DATETIME Values

I have buil a app that records types of transactions.

Each transaction has a specific type and also a DATETIME value attached.

I can display and work out calculations on all the data but I do not know who to sperate this into doing calculations for the previous days, week, month ext..

This is where I really need your help.

Can you please instruct me in how to do this, what im thinking is where the user can enter or select the days date thay want to look at and then this quiries the informatio where the date is within this critetra. (the same for week or month also)

Another problem for this is how can I have a something on the page which automatically tells it look at yesturday only, how does the computer know what yesturday will be, will the user need to enter yesturdays date in a specific format?

ANY HELP WOULD BE REALLY GREATFUL as I have a short time to put this historic information viewer togther.

View Replies View Related

Calling/passing Values To Another Server

I have an asp page that writes to a database after making a sale. This part works fine. In this same asp page, I would like to then call a different server to release a product key. The following is what I need to call: Code:

View Replies View Related

Disappearing Form Values When Calling Subroutine

I am calling a subroutine when I click a submit button. In the subroutine I grab values from text boxes and validate them. If it all works then it goes to the Update page.

Well my validating works but when it calls the Update page I am using the Request.Form to get the values from the form to update/insert into the database.

Well if I do an update it updates all the fields as empty. If I try to do an insert is says it can't insert NULL into the Primary key field.

Now most of the time the Primary key field is a list box and I don't touch it in the subroutine. Still why are all my values disappearing when I call the subroutine??

So I guess that is it. When I validate a forms values, them same values are no longer available on another page through Request.Form?

View Replies View Related

Calculating Age

I have a form setup to search for people between CageT1 and CageT2 but am unable to get it to work. Peoples birthdates are stored in Access in m_date_of_birth; age is not stored in the database. The code below is a test.asp page I created so that I could debug the problem; thats why all this page requests is a Response.Write(sql). Code:

View Replies View Related

Calculating Vat Tax

I'm having difficulty calculating vat 917.5%). I've written some basic asp to do this, but the result is far from correct. Can anyone spot what I've done wrong ?

<%
Session("price") = (Session("variable1"))+(Session("variable2"))+(Session("variable3"))
%>
<%
vat = Session("price") / 100 * 17.5
Session("total") = Session("pprice") + vat
Session("total") = FormatNumber(Session("total"), 2)
%>

For example, if my variables are:
variable1 = 165
variable2 = 50
variable3 = 25
When I write the session variable 'total' it comes out at: 1,944,654.38

If I run the vat calculation on just on variable, without adding them, the result is correct. So I guess I'm adding sesison variables incorrectly?

View Replies View Related

Calculating Time

Ok so I have 5 variables:

start = "8:00:00 AM"
lunchstart = "12:00:00 PM"
lunchend = "1:00:00 PM"
end = "5:00:00 PM"
totalhours = X

What I want to do Is calculate the total hours between start and end and subtract the total time spent on lunch. For example, using the variables above I have been trying for weeks to figure out how to make total hours = 8

View Replies View Related

Calculating The Score

I have set up a variable that if the answer is correct score =1 however im not sure how to total all the scores and i would also like to have it as a percentage. Code:

View Replies View Related

Calculating Median

I have a microsoft access database with one table. I am trying to extract a filtered list of records from the database using ASP. So far i am able to do this. My next step is to somehow calculate the median from this filtered list within ASP. Maybe using some VBscript or something?

View Replies View Related

Calculating Fields From DB In ASP

Let's say I have an Access DB with a table named proCount. In the table proCount, I have two fields named numOne and numTwo. In my ASP page I'd like to have a repeating region that lists all the records in the proCount table. Is there a way to have ASP calculate the sum of all the returned records for the field numOne and the field numTwo?

View Replies View Related

Calculating Probs

I need to get the sum of all fields where clientID = 'woteva'

so far i'm only doing this by bringing them up with the 'move nxt' but this then displays all the fields, where i just want to display the result without all the fields showing aswell? Code:

View Replies View Related

Calculating Percentages

I know this is more of a maths problem. But I'm not having a good day with it today. what I need to do is work out the percentage of closed job against the total jobs made? So

StrTotalJobs
StrClosedJobs

are the varables. What is the code I need to work it out?

View Replies View Related

Digits Calculating

when I calculate a Digits for example: 101.12 * 1.21 the resilt is 122.3552 This one should be 122.36 and if it is 122.3549 to be 122.35 How can I make this thing works?

View Replies View Related

Calculating Birthdates

I have birthdates in a field called CustomFieldDOB in a table called Vendor. The birthdays were entered with mixed formats, m/d/yy, mm/d/yy, m/dd/yy, m/d/yyyy, mm/d/yyyy, m/dd/yyyy, and with separators of / and -.

Total number of entries is 5600+ so manually changing each of these to one format would be VERY time consuming. In the end, I am trying to have our Intranet page show "Today's Birthdays". I am familiar with setting up a loop to display the Vendor names , I just don't know how to calculate variable formatted birthdates.

View Replies View Related

Calculating Minutes Between Dates

I need to calculate the number of elapsed minutes between two datetime variables. BUT, it needs to only include times between 8am and 5pm on weekdays.

So if the starting datetime is at 5:01pm, it doesn't start counting until 8am the next weekday morning.

Or, if the ending datetime is at 6:30am, the counting would stop at 5pm the previous weekday.

View Replies View Related

Calculating Time Difference

I am logging a time that people log in, stored as a short time. I want to be able to run a script which runs through my users database and checks all the users who are logged in, it checks the users last action time time against the current time and automatically logs any out any users who haven't had any activity in more than 30 minutes.

pseudo code as follows:

dim currentTime = now()
dim lastActionTime = rs("lastAction")
if(lastActionTime < currentTime - 30 minutes)
log the user out

Can anyone tell me how I code the time calculation to deduct 30 minutes from the current time?

View Replies View Related

Calculating Database Fields

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

Calculating Page Breaks

I am trying to modify an existing ASP application that produces forms with several 'blocks' of text that are contained within table cells and which have their own HTML id's.

These blocks must not be split over two pages. Is there a straightforward way of calculating the size of each block/table cell so that the blocks are not split and the form prints on the minimum number of pages? This is an intranet application, so we have a certain amount of control over browser settings, so margin settings etc are not a problem.

View Replies View Related

Calculating Average From An Array

I have an array like

array = "1,2,3|,2,4,6| ...)

There will be an unknown number a values between the | and an uknown total number of values. I need to get the average of the number between each of the |'s. Any ideas how to handle that?

View Replies View Related

Calculating Text Pixels

if there is a way in ASP, to calculate with of a string of text in pixels. The result is to be used to set table width so that texts don't get wrapped to second line.

View Replies View Related

Calculating Totals With Data From Access

I have done a fair amount of coding but very little in the way of maths type stuff

<code>
While Not objRSC.EOF
Response.Write "<tr><td>"
Response.Write objRSc("Item_Quantity") & "</td><td>"
Response.Write objRSc("Stock_item") & "</td><td>"
Response.Write objRSc("Stock_description") & "</td><td>"
Response.Write objRSc("Item_Price") & "</td></tr>"
objRSc.MoveNext
Wend
</code>

What I now want to do is to add all the Item_Prices together, .

View Replies View Related

Printing/printing Reports From The DB

Is there a way I can put a print button on my asp that will actually print the current Screen opened. My asp has an access backend.On my asp page can I have a button that can actually print a report from the Acesss Database.

View Replies View Related

Printing/printing Reports

Is there a way I can put a print button on my asp that will actually print the current Screen opened. My asp has an access backend.On my asp page can I have a button that can actually print a report from the Acesss Database.ie a button that will go the report section of access DB and print teh report that I want a way to get around with the appropriate codes will be appreciated as I am new to asp programming.

View Replies View Related

I Am Having Problems With Calculating The Total Seconds From Two Date/times.

I need to get the number of seconds when subtracting two date/times.
With the code I am using below I subtract the two date/times and end
up with a total of days like "1.56".

Then when I multiply it to get
the number of seconds I am not getting an accurate number. I should
only have whole numbers of seconds with nothing past the decimal
point. I would like to be able to subtract the two date/times and get
the number of seconds without multiplying to get it. Is this possible?
Does anyone have a better more accurate way to do this? Code:

View Replies View Related

VBasic Text Field (phone Number) Calculating Data Before Inserting Into Access

I have a text field in a web page I am working on that seems to be calculating phone numbers before inserting them into an Access database. i.e., 867-5309 will result as -4442 in the Access text field. My guess is that the webserver or client is processing it before inserting it. Is there any way to stop this other than using a validation script?

View Replies View Related

Form Values With A File - Passing Values

I want to call a recordset so you can edit the details and then obviously pass the parameters onwards into the db. However, the user guide just says this:

To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include: Code:

View Replies View Related

How To Convert Escape Values In To Actual Values

i need to convert the escape values which are by mistake updated in DB.
example:

this is a sample text string
is updated in DB as
this%20is%20a%20sample%20text%20string

here %20 is the space.

like wise there are many entries for :,'

is there way that i can update all this in a update statement?
or use asp to to update the records?

View Replies View Related

How To Extract Indiviual Values From A Set Of Values

I have a variable SET which has the value Of 1, 2, 3, .., N.

SET=val1, val2, val3, val4, ..., valN

What is the commend or procedure to extract individual values, val1, val2, ...

View Replies View Related

Return From ASP.NET To ASP

I updated to aspx last three month,after developing serveral
applications,Idecided to downgraded to asp, following is my reasons:
1.in ASPX,the page format is hard to control,in ASP u can change every html
as u like ,but in aspx, a aspx control decide the page format,and its hard
to change the format.

2.ASPX is said to be faster that asp, but it is based on too-often
communication back to the server,for example,u click a radio a button,there
is new page request, but in reality,such a communication is
bandwidth-consuming and time-consuming. the user only need to submit the
form, and the exchange between IE and Server was minimazed.
the Speed of ASPX is not useful for most sites, for bigger sites, the speed
increase is singnificant,but for small sites with less traffic, the speed of
ASP is quite enough.

3.ASPX is based on Object Orinted Programming, but in most small sites,
Procedure orinted programming is used, we never build objects, and POP is
more efficient.ASPX is for three-tiered structure with a single layer of
business logic component, but in reality, most of us used two-tier
structure,that is Presetation layer and Datalayer, we can layout the page
and change the database in a single page, quite effienct too.

View Replies View Related







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