Perform Functions On Recordset?
Is it possible to perform functions on a recordset (rather than on the
source database), e.g. COUNT, MAX etc
The reason I would like to do this is because I have a hugely complex view
which produces results with over 60 columns of data. I would like to display
all data but also highlight individual "cells" in the table which have the
highest (i.e. MAX) data for each column. I would also like totals at the
bottom of each column.
Obviously I could get the MAX value for each column by performing it on the
SQL data but that would effectively mean running the query twice and would
take twice as long.
View Replies
ADVERTISEMENT
if i want to perform the below sql update like every 10 mins when detected the hr:min:sec sessions started. And where should i put it in global.asa ? Session_onStart ?Code:
hrs=Session("Hr")
mins=Session("Min")
secs=Session("Sec")
strSQL = "UPDATE Attempts SET Hrs=" & Hours & ",Mins=" & Mins & ",Secs=" & Secs & " WHERE studentID ='" & Session("StudID") & "' AND Paper = '" & Session("Paper") & "'"
objConn.Execute (strSQL)
View Replies
View Related
The project i am working on just now requires me to provide users with a link to download articles stored on the sites FTP server.This is not a problem to do, however, i also need to keep a record of who downloads what and when. I therefore have a downloads tablein my DB for storingthis info. The problem is, when the user clicks on the download link i need the document to be downloaded, AND a query to be executed to record the info into the DB table. I effectivley need the link to action these 2 eventssimultaneously!! Not sure if this is possible.
View Replies
View Related
Is there any way that I can for example, send an email After a file has been downloaded? Currently, it is setup so when they click to download a file...it sends an email...I am trying to figure out a way to have the email sent only have the download has completed.
View Replies
View Related
if I have a list of items which I have to complete next month on different dates, how do I select all the items due for next month, or all items due for the following month. Example:
Task 1 due 15/11/2004
Task 2 due 17/11/2004
Task 3 due 18/12/2004
I want to get back:
Tasks Due for November
Task 1
Task 2
View Replies
View Related
how can i put the error messages in HTTP 500.100 - Internal Server Error - ASP error page in a nicer way so that it suits my web design.. ?
View Replies
View Related
suggest me a asp page which can detach and attach databases. We can use the sp_detach_db, sp_attach_db.I am mainly into administration .As im not into much asp programming im finding it difficult. I dont have much time left to finish. help me with this.If any one have ready made asp page for this purpose ,he could give me the script
View Replies
View Related
i keep getting this error:
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/rces/insert-script.asp, line 108
here is the code with the highlighted problem line
Code:
View Replies
View Related
I have the belwo code which i mean to do an multiple checkbox insert. I have managed to get it so i puts all the checkbox values into a string seperated by a comma, and it insert into a database, however just not how i need it to.
Curently inserst like :-
View Replies
View Related
I am performing a post from one classic ASP page to another in order to get the value of a string passed between the two pages. I have a client script variable declared to take the value of the value being received in the page i.e. var x = '<%=varName%>'. Unfortunately, ASP seems to be adding a carriage return to the value of varName when it
is passed in i.e. it expands the stated line to var x = 'FieldContents';. I.e. somewhere a carriage return has been added. The string gets passed in OK if I use the Get mechanism. Don't know why this carriage return is being added when using Post mechanism. Anybody seen this before? Is it a bug in ASP ?
View Replies
View Related
I have two URLs. Static.htm and dynamic.asp
Static.htm
Contains a form with two text boxes, called text_1 and text_2 and some other info that is irrelevant for my question.
Dynamic.asp
Need some code to check that the text boxes only contain values greater than 0 and only numbers. Thus if any of the textboxes for example contain -3 or the letter m I want to cancel the form submission and display some kind of error message.
How can I achieve that?
View Replies
View Related
I want to be able to log in a database any transactions my users perform. For example logging in, requesting a page, downloading a resource, logging out etc.
What is the most practical way to code this? I was thinking of trying to use an include file which would have a function to add a log in the database for each page on the site or when a particular action is performed.
View Replies
View Related
Last week, my shopping cart was still working well until I began getting the following errors 2days ago..
Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
../order/saveorder.asp, line 157
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
GET /main/saveorder.asp
Could you check my code below and let me know what possibly the error is?
View Replies
View Related
I have a file i created
it contains several functions, and some other code to build a string based on diffrent vars.If i run this file standalone, it works absolutly fine. However the problem comes when i include it half way in another script.
I get the following..
VBScript Error 800a03ea
test4.asp, line 2 function encr..
This is line 2
Function Encrypt(Message, EncryptionKey)
View Replies
View Related
I am searching for a function that can separate a string var to some string vars and devide the string by "," marks, os this possible?
example:
str1 = "2,34,1,54"
and I want "2","34","1" and "54" be devided and inserted into new vars, or an array var, is their a VBscript function for this?
I have made a function myself that does this using ths Instr and the Mid functions, but its quit messy and I don't wan't to have to insert it in every page I make, Any Ideas?
Another small thing, I want to learn how to use Classes in ASP, I don't know what to look for exactly, (vlince, I could use a link now...)
View Replies
View Related
<%= functionName(value1, value2) %>
Trying to call a function which returns the modulo of two numbers, can l simply whack the function name in and the value will be returned ?
View Replies
View Related
I've written the following function but somehow the output is not what I want it to be. Can someone explain to me what i'm doing wrong?
function fn_piping(inputWaarde)
outputwaarde = inputwaarde
Response.Write outputwaarde & "<BR>"
if i = 1 then
i = 2
call fn_piping("thisshouldbethefinaloutput")
else
fn_piping = outputwaarde
end if
end function
i = 1
figure = fn_piping("bla")
Response.Write "<BR>" & figure
So 'thisshouldbethefinaloutput' should be the final output, but it doesn't output anything?!
View Replies
View Related
I need a current record in the database for it to work but I have another page that uses this same code and it works fine on that and the only thing different in the coding is where the information is being pulled from in the database and when i first copied & edited the page it worked fine but now it doesn't and i've worked on it .....
View Replies
View Related
I would like to call a asp function when i click a button in a form. I'm using VB. I know in Javascript it the onclick event is there a similar handler in VB????
View Replies
View Related
Where's the best place for me to include all my functions that I want to call throughout different pages? Should I just put them all in one ASP file and include that page on every page? Or use global.asa somehow (how??)?
Anyways, I was just wondering because I didn't want to slow things down if I could help it (I didn't know if having another big file attached to every page when I'm just using a small portion of it was very effective or not)
View Replies
View Related
i am wondering how to actually get the month in letters..... i have used a
strMonth = Month(Date)
but it is returning a number of the month... i would like to make this the actual month such as January, August, etc.... how would i go abt doing this in ASP.....
View Replies
View Related
Over my years developing ASP applications and writing asp code in general I have created a library of nice little apps and functions that I use over and over again.
I was "thinking" about maybey setting up a site with all my useful functions, subroutines, and possibly applications for people to download and hopefully donate some money if they use them. Perhaps even have some apps for sale only.
The apps will mainly be my useful plugin developments such as guestbook, gallery, login system etc. My question however is do you think it would be worth the time and effort? Do you find yourself using plugins a lot?
I defo think the functions could be handy but again how many of you search for functions to help you out or indeed how many of you currently use functions you have gotten from other people? Would you donate something if you used them?
Mayby some of you have already done something like this and can let me know how you got on?
View Replies
View Related
Didn't remember if anybody had started started like this, but I decided it would be cool to start it again. If you have a math function request ask it below, or if you have made one then add it:
I have a few cretegean plane (think thats how you spell it), calculations. One request I have is, does anybody have a short function for square root?
View Replies
View Related
I have some code I am working on. One function reads a file using fso, then
I have multiple functions using the string read from the file. Each
function splits the lines up and will return one value.
Is there a better way? Is handling this many array which are basically the
same going to cause some server distress
View Replies
View Related
I know there is the function IsNumeric() in ASP and we have a SUM function in SQL, but why don't we have the following functions in ASP:
Code:
Sum()
IsAlphabetic()
View Replies
View Related
I have been developping a webpage in ASP for about 4 weeks now and I have noticed that I am rewriting similar functions in pretty much every page i make. So I was wondering if there is a way to make some particular functions global so that you can use them in any page. The functions will depend on the session id, but I don't know if i can declare session functions or not.
View Replies
View Related
In this function i pass variables to it to find out if a record exists, what i want to do next is call this function and if a record does not exist pass a variable out like Statement = False and then pick up that value on the page that i call the function.
Can this be done? I was thinking perhaps using a Session? Code:
View Replies
View Related
So i am inserting Now() or Date() (Either one will work for what i want), into one of my fields.
But it is returning the Server time, which is about 17 Hours behind of what i want. Is there anyway to insert Australian time, as in where i am situated?
View Replies
View Related
I'm a PHP programmer. That said, I recently began a job where a good third to half of the applications are written in ASP.NET. VBScript, to be precise. As I've done programming for years (C/C++, PHP, JavaScript, BASIC... the list goes on and on), picking this up hasn't been too difficult, but I now find myself facing a question that I simply cannot find an answer to anywhere:
Can one define a function that has optional parameters in VBScipt?
If not, can it be done in C#, and can C# code be easily integrated into pages written in VBScript?
View Replies
View Related
I have written a very complex web app for intranet use. It allows users to search a large database and then returns formatted results. I am currently employing a method as below: Code:
View Replies
View Related
if there was a function in ASP that checks a date to see if it is valid or not. I am aware of the IsDate function, but I think its not what I'm looking for. I want to run the following date through a function and have the function tell me that it is
invalid: 31-Feb-2003 (cos there is not 31 days in Feb).
Or a good way to make my own function?
View Replies
View Related
I have a function called GetRS which takes in a SQL string and returns a recordset object. Does this mean that a copy of the recordset is returned or is it passed by reference?Obviously this could have a large impact on performance for large recordsets.
View Replies
View Related
There is a chapter on SUBROUTINES, FUNCTIONS AND INCLUDES.what is the difference between SUBROUTINES and FUNCTIONS. If not mistaken, in VB, the SUBROUTINES return no value, but FUNCTIONS do have return value.Variable in ASP: global versus local.variable not in betweeb function is Global (what about subrountine, is it the same) and variable in between function is local, am I right?
View Replies
View Related