Public VB Script Procedures

I have a VB script Sub() that is used by several ASP pages. How do I make it
globally available rather than having to replicate the source code in each
ASP page that uses it?

View Replies


ADVERTISEMENT

Public Modules

Im coming from a visual basic 6 background.

I am making an ASP script with vbscript language.

anyways, in vb6, you can create a 'module' and put "public" functions and variables there.

how do I do that in ASP? i have a couple of functions that will be basically used on all pages (a function to prevent SQL injection).

So how do I create a page with all the public functions and use them on other pages?

View Replies View Related

Public SUB And FUNCTION

Can I create a Function or Sub in my GLOBAL.ASA file for all pages of my application to use? If not, how does one do this? For example, I have an "IIF" function since it isn't natively implemented in ASP. Currently I have an Include directive on every page that includes the scripting for this function. I'd rather just declare it once, globally.

'--- Provide IIF functionality to ASP -------------------------------
Function IIF(eval, trueVal, falseVal)
if (eval) then
IIF=trueVal
else
IIF=falseVal
end if
End Function

View Replies View Related

Querying Msx 5.5 Public Folders

Would anyone have a way to access certain Exchange public folders that
contain news group emails, perform a query on the folders for keywords and
return a list of those emails?

Basically, I've been asked to put a simple
single field on a web page that will query a list of exchange public folders
and return a list of those emails that have a key word match.

sort of like the MS Index server does on folders with files where one has an
asp interface to query the index data base.

View Replies View Related

Appointment To Public Folder

how we can add appointment to public folder in ms exchange from asp page.Can anyone give some pointer or sample code how to do such a thing.

View Replies View Related

Public Folders And Protection

we have a folder with pictures of signed up users. we are trying to protect this folder from the public in two ways. hide the relative path

e.g. /welcome/images/544235432.gif

makes it easy for a user to easily download this file . put a password and access the folder through this passwords .

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

Querying Msx 5.5 Newsgroup Public Folders

we would like to be able to put a simple query field on a webpage whereby users could enter keywords and then have some of the msx 5.5 public folders searched and return a list of those emails that match the criteria. would anyone know how that might be done useing asp and mapi?

View Replies View Related

Restricting Access To Website From Public

I'm creating a web application for my company now. This application has 2
parts. 1 part for the customers to access. The 2nd part is for our staff to
access only. My director hopes to make the 2nd part to be something like an
intranet, such that only our company's computers (maybe only 1 or 2 in the
company) can login to this part of the application.

1. My company's intending to put the application on shared server with a web
host. Windows Authentication is NOT allowed.

2. My company doesn't have a static IP address.

3. My manager suggested using Network Card number (which I don't really
quite understand. Is there a way to get the Network Card number that's on a
client PC?).

How??

Some ISP told us that they can provide a firewall management feature such
that it will restrict access to the website from anyone that is not coming
from my company's network. This requires Static IP.

Another told me that IIS Manager has the security feature that restrict
access based on IP address. This requires Static IP again.

Is it possible to implement the 2nd part (the part that is to be accessed by
my company's PC) as a windows application instead? Then we only put the
windows application on one computer. So, 1st part (for the public) will be a
web application, 2nd part (for my company) is a windows application, both
accessing the same database server from an ISP. Will the ISP allow the
windows application to access its database server? I've no experience in
making a windows application at all, is it the same as making a web
application?

View Replies View Related

Exporting From Outlook Public Folder

I am trying to take all the messages that are in a public message folder and export them to a database and then from there I can output to a webpage. I have it set up so I can do it all manually.I have to copy them all to a persoanl folder and from there I can export to a database.

I am looking for a way to automatically. Is it going to be possible to do, or will I need to take a look at making a Macro to do it? I havent done any real VB in quite some time, just VBScript in ASP's. I am trying to avoid doing the macro thing.

View Replies View Related

Access Exchange Public Calendar

Is it possible to access Exchange 2003 public calendar through ASP (Exchange & IIS will be in separate machine)?

View Replies View Related

Populate Data From Public Websites

I am going to construct a housing search website ... similar to www.mls.ca ... is there anyway I can populate the data(s) stores in their database? So when my user search for one kind of house, my website will return the data from the MLS database? Or there is similar way to get data from public websites?

Also, if a user search "sport" in my search text box, it will returns all the related links ... just like those search engine ... how can I acheive that? Or I need to pay or register to get the function?

View Replies View Related

Displaying A Calendar From Exchange - Public Folder

Is there a way to display a calendar created in a public folder? We are
using Exchange 2003 and have an intranet and I would like to pull the daily
view form the calendar and display it at the bottom of my daily
announcements page.

View Replies View Related

Using Procedures In ASP

If I need to use a procedure call when clicking on a form button of an "ASP" page instead of submitting the form.

<Input type="Button" name="btnInsert" value="Insert" OnClick="btnInsert_Click()">

<%
Sub btnInsert_Click()
' I need to open a table and insert the data I collected in a form
EndSub
%>

When clicking I received an error "Object Expected". What is wrong in the code.

Should I inclose the btnInsert_Click() within the <Script> tag?

View Replies View Related

Sub Procedures

I'm pretty new to ASP so this may seem like a stupid question but
is there anyway I can use something like an OnClick or OnChange
sub procedure similar to the ones you can use with VBS or JS?

View Replies View Related

Stored Procedures!

Just a quick question. I am using Sql Server 2000 and calling stored procedures from asp.
At this stage i am forgoing using the ADO command object and am simply create dynamic like sql statement for store procedure execution.

My question is, I find the code below quite messy, particularly when it comes to checking for option parameters using if statements. Is their a better way to write this, keeping in mind i have to check in a value exists before adding the appropriate parameter
to the stored procedure call.

Is there are more elegant way?....

View Replies View Related

Stored Procedures

A while back people were looking into stored procedures and code to list which ones exist
Does anyone know the code to list all the stored procedures in a my sql database?

View Replies View Related

Stored Procedures

could anyone provide me with some simple example code of asp classic
calling adodb? specifically, i'd like the code to:
- call a couple of stored procedures that have optional parameters
- share a connection over the two calls

View Replies View Related

Stored Procedures

If I have a html table with, lets say three columns, and I have to fill each column with different data from database, could I use a stored procedures to write three separate sql queries?All I need than is to create a loop for each column.

I have never tried before writing a code with more than one sql query, and that isn't working out for me this time. I've read about this stored procedures. I don't know if that's the answer.

View Replies View Related

Using Stored Procedures In ASP

Can anyone gives me an example how to use stored procedures in ASP. I know how to create views but he must I call a stored procedure ?

View Replies View Related

Stored Procedures

In order to access return values and output parameters from a stored procedure, the recordset must first be closed. Is this correct? If so, can someone please shed some more light on ADO, stored procedures, their parameters and recordsets. Specifically, I've seen some code that accesses the output parameters and return values by switching to the next recordset.

[vbs]
Set adoRS = adoRS.NextRecordset
[/vbs]
and then some other funny stuff ...
[vbs]
Response.Write "<p>Return value = " & CmdSP.Parameters("RETURN_VALUE").Value & "</p>"
[/vbs]

Is a second recordset always created when you have output parameters and/or return values? And what are these properties of the parameter object? How do you guys work with ADO?

View Replies View Related

Executing Stored Procedures

set rs = Server.CreateObject("ADODB.Recordset")
objConn.usp_RetrieveCategories rs

Method 2:

set rs = objConn.Execute("usp_RetriveCategories")

Which method is considered to efficient. Is it method 1 or method 2?.
The stored procedures returns no values.

View Replies View Related

SQL Stored Procedures, Calling In ASP

I am trying to send some emails that are stored in a SQL database to a variable within my ASP page. Once the emails have been gathered and stored in the variable (as a string of emails) I want to send an email to those emails using that variable.

I'm trying to accomplish this by using a stored procedure.

Here is how my SP is set up in sql enterprise manager:

Code: ....

View Replies View Related

Calling Stored Procedures In ASP

I am trying to use a stored procedure created in SQL Server 2005 and execute it in ASP. How can I return the entire recordset from the stored procedure the way I can do it with a recordset?

set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = Conn

' Specify the name of the stored procedure you wish to call
cmd.CommandText = "sp_Org_Structure"

'Form variable to pass as a paramter to the SP
strUI = 4655

sql = "EXECUTE sp_Org_Structure " & strUI
response.write sql

Secondly, instead of hard-coding the name of the SP in the sql statement, how I call the 'cmd.CommandText' from within this SQL Statement.

View Replies View Related

Error Using Stored Procedures

I get the error:

Microsoft OLE DB Provider for SQL Servererror '80040e37'

Invalid object name 'compmatrix_divcontrols'. /compliancematrix/qocdx.asp, line 13

my asp code begins with: ....

View Replies View Related

Convert Asp Stored Procedures

i have some stored procedures written in asp can i use the same stored
procedures in my .net web application.

View Replies View Related

SQL Injection - Stored Procedures

I have been working on this particular project for a little over 2 weeks now. This product contains between 700-900 stored procedures to handle just about all you can imagine within the product. I just personally rewrote/reformatted close to 150 of them myself. Nothing too fancy, mostly a lot of formatting. We have a little down time between Q/A and fixing any bugs they find so I decided to test the security of the site with Cross-Site Scripting and SQL injection. Because SP's are used in pretty much every aspect of the site, the site isnt vunerable to the simple Injection stuff like '
OR 1 = 1 . Instead I've had to try several things which I will get to in a minute. As I have access to all of these SP's and the dB in which they reside, I could easly look at the code and determine what variables are neede to pass in. I've been trying to break the site to give up a database name so I can proceed to check the system tables etc etc - much like a regular hacker would (meaning not cheating by looking at the code). So, I've started my attack by downloading a local version of the login page, changing a few variables and injected somthing like:

'SELECT * FROM INFORMATION_SCHEMA.TABLES

Initially, the statement is passed into the form fields and wont return anything other than a JS popup error. I altered the statement intentionally to break the page

SELECT * FROM INFORMATION_SCHEMA.TA'

and it produces an error giving me the name of the query and its location when I plug the name of the query in the url i.e http://theurl.com/query_folder/query_name/ it fires me off to another folder containing an include file of some sort. When I run that include it gives me the name of a pretty important variable. Apparetly its a variable that determins what dB I should point to.

Now, one of the issues I have is that everything is a stored procedure so trying to hack it is a little more difficult ....

View Replies View Related

Viewing Stored Procedures

Is there any way of viewing a list of stored procedures from a database.for example i state i which database i am looking at and it returns a list of stored procedures.

View Replies View Related

Stored Procedures Practical

HThe aspfaq.com seems to really push stored procedures, and I hear the same advice here all the time. So I want to take the advice.

Is it possible to create and practically maintain, delete, use, etc. stored procedures soley from asp (i.e., no GUI or console- like being hosted on Brinkster)?

The tutorial on aspfaq.com mentions that stored procedures can be created from asp code- how? Do you just send the stored procedure you'd type into the GUI with oConn.execute() instead?

View Replies View Related

Command Objects Or Not For Stored Procedures

I use stored procedures in my asp using the connection object. I validate any inputs to protect myself from SQL injection. Why is it, or isn't it better to use the command object? I have used the command object with parameters and the coding was a pain.

Comments?? I realize this is an open ended question but I am trying to improve my skills/code if need be.

View Replies View Related

Working With Stored Procedures - No Output

I am working with a sql server developer to create reports. He writes the stored procedures I do the web piece to display them on web.

At the moment I am having problems getting the record set from the stored procedure to display properly.

what I get is: (the table is repeated on purpose - I want to consolidate the IRS01 to single line [second table])

Appropriate vs Reimbursed FTE's for 2005 .....

View Replies View Related

Error Using Stored Procedures With Parameters

I'm having trouble calling a stored procedure. For some reason I keep getting this error.
--------------------------------------------------------------------
ADODB.Command error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
---------------------------------------------------------------------

Here is the code: .....

View Replies View Related

Stored Procedures With Page Listings

I've started using stored procedures but I have a problem. My stored proc works fine but when I want to use it to list results on several pages I get an error. My previous code:

View Replies View Related







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