Private Subroutines

In ASP, if I define a subroutine as private

Private Sub mySubroutine(arg1, arg2)

I understand that the variables I define inside the subroutine are local only to the
subroutine. If the same variable is defined outside the subroutine, it won't conflict
(right?) What about variables that are defined outside the subroutine, but not inside? Are they available inside the subroutine?

View Replies


ADVERTISEMENT

Subroutines

I'm building a system that flags Spam phrases and brings them to the attention of admins. I have a table with a list of about 90 terms and I want to show any rec ords that display them so Admins can determine if they should be deleted. The method I'm using is:
Building String
Code:
oString = "SELECT int_RecordID, txt_RecordName, txt_RecordDescription FROM dbo.qryRecords
WHERE txt_RecordName LIKE '%Viagra%' " & Call subSPAM & "
ORDER BY dte_RecordStarted ASC"

View Replies View Related

How To Write Subroutines In ASP?

I have a script in ASP:

If strReport = "OrderDetail" then
strReport1 = strReport & ".rpt"
End If

If strReport1 <> "" Then
strReport1 = strReport & Year(strPeriod) & ".rpt"
End If

Now based on the kind of value in strReport1, I would like to do 2 different set of work.... Like for instance,

If strReport = "OrderDetail" then
call SubReportDB
End If

If strReport1 <> "" Then
Call SubOrderDetail
End If

Is that the right syntax?

View Replies View Related

Call Subroutines

how can I can a sub routine in ASP which has been given attribute runat=server

View Replies View Related

SUBROUTINES Vs FUNCTIONS In Asp

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

Nested Subroutines

I am using IIS 5.0, ASP and VBScript. I am puzzled by recurrences of errors when I nest subroutines, and I'd like to know if there are rules for that which I don't know. Would functions work better instead? I am not much of a coder.

View Replies View Related

How To Email A Private Message

When I try to email a private message to someone who responded to my posting it tells me that i don't have priviledge. I am registered but don't understand why I cannot email a private message to anyone.

View Replies View Related

PM (Private Messaging System)

I am trying to create a Private Messaging system for my Simple log in system, I am making forums my self, but i am not sure how to put a private messaging system in, could some one please give me the script plz?

View Replies View Related

Server-side Subroutines

I am wanting to call a server-side sub when I click on a button.

Code:

<%@ language="vbscript" %>
<%
sub cmdButton_Click
code
end sub
%>

how do I call this sub from an input button.I have tried the onlclick property but it doesn't seem to work. Is this possible.

View Replies View Related

Redirect To Private Server

What is the "right" way to redirect to an internal server from the outside? In other words, users can connect to my website and then I need to be able to redirect users with the correct login to a server with an internal address (10.x.x.x). Obviously I can easily redirect them with the address, but the idea is to protect the internal address from the outside.

I tried linking from the public site to a script page that simply redirects to the internal address, but the internal address still appears in the address bar and I don't know how to map it to a name without every user needing a host file entry. Anyone know of a way to do this? Basically the purpose of this is to allow external users to connect to an internal server to view proprietary data.

View Replies View Related

Viewing Database In Private

how to view my database without making it a webpage for everyone to see. I would like to create a form and intake client name and phone number but I don't want the information available to the publicc to view. Is this possible. I use frontpage2002, windows millenium, and asp and frontpage extensions.

View Replies View Related

Issue With Private Functions

I just tried a test comparing a Function to a Private Function with this code:

<%
Option Explicit
dim X1
X1 = 9

Private Function RealTest(here)
RealTest = here + X1
End Function

Response.Write "The answer is " & RealTest(10)
%>

I get "The answer is 19". If the function is defined as private, shouldn't I have gotten
an error in the function that states that X1 is undefined?

View Replies View Related

Difference Between Private And Public Function

What's the difference between a private function and a public function?

What's the difference between a function and a sub-routine?

View Replies View Related

Call Subroutines Via A FORM Action

Can I have this: Code:

<!-- #include file="myFunc.asp" -->
<form name="myform" method="post" action="<% function1(); %>" >
..form stuff
</form>

I tried it but it was as if the page was trying to process the function before the page rendered.

View Replies View Related

Passing Values To Subroutines - Empty Returns

I'm having a bit of trouble with a subroutine I am calling when it is
invoked for the first time. When the subroutine runs, I expect it to return
a value for every time it is called. However, it seems as though the first
time it is run, I don't get any returned values. However, subsequent
returns will get me something back. Code:

View Replies View Related

Memory Leak? Private Bytes/Virtual Bytes

As I ran in to errors like "Ran out of memory" and "Out of memory" I
supposed my website might have memoryleaks. To trace a potential memory leak
I isolated the IIS process and monitored the 'Virtual Bytes' and 'Private
Bytes' for a while.

I noticed the private bytes stays 'low' all the time. Sometimes a bit up,
sometimes a bit down. Virtual bytes also follows the same pattern for most
times. But, sometimes it increases to almost 2gb en stays there.

I've been reading for memory leaks an aggressive caching and stuff and was
wondering when there is a memory leak. In short: what does it mean thet the
amount of virtual bytes stays high? Is this probably due to caching or....?

View Replies View Related

Difference Between Private Function And Public Function?

What's the difference between private and public functions in ASP? When should I use either?

View Replies View Related







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