Non-Profit Hosting, ASP Hosting, Domain Name Registration, Affordable, Reliable


Home | Hosting | Domains | Databases | Support | Email Services | Commercial / Personal Sites | View Cart

 

ASP Com Objects


Setting up a web page for email (ASPEmail)

We use ASPEmail to send mail from our servers through webpages. To do this you would first add the sendmail include to your includes directory. Next you would attach the following line of code to the top of your page.

<!--#Include File="includes/sendmail.inc"-->

Create your form and then send the information to the sendmail function call as shown below;

Sendmail From, FromName, SendTo, Subject, Body, Priority

From = Email address of the sender
FromName = Sender's Name
SendTo = where do you want the email to go to
Subject = Subject Line
Body = Body of text
Priority = Sets email priority flag

The include file and html manual can be downloaded below with full instructions.

Download Back


DSNLess database connection for access databases

First thing you have to do is have the physical pat on the server. For our servers this path is:

C:\Domains\myWebSite.com

DSNless connections are easy to produce and can be kept with your scripts. This also allows you to have as many different databases on one website. Your databases are store in the 'db' directory. This directory was created when your website was created and has all the necessary permissions for connection. Your physical path will C:\Domains\myWebSite.com\db . Now for the connect string to access the database.

DSNless = "DRIVER={Microsoft Access Driver (*.mdb) _ ;UID=;PWD=;DBQ=C:\Domains\myWebSite\db\mydb.mdb"

The first part of the string is your ODBC connection string Driver. Next is the UID. You should never have to enter anything for it to equal, but do include it in your statement. PWD is your database password. This you can set inside access by opening the database in the exclusive mode. Click on tools, Security and then click on "Set database password" make sure it's something you can remember because once its set you will need it anytime you want to open it. Ex.: PWD=mypassword.

The last piece is the DBQ. This is where you have to place the physical path to the database. See example above.

Back


DSNLess database connection for MySQL Databases

You can attach to a MySQL database similar to an access database, only you don't need to know the physical path. MySQL databases are installed by us for you. We create the Database then you add the tables you need to make it functional. This is done through the web based interface located in the members area. MySQL is set up for a small fee. Your connection string will look like the one below:

DSN= "DRIVER={MySQL};SERVER=localhost;DATABASE={mydb}; _
UID={youruserID};PWD={YourPassword}; OPTION=16834;"

Leave the { } off when you insert your information. These are only to show you where your database information is placed.

Back


Approved Message Board for websites at Badger Web Hosting

Badger Web Hosting had found that many websites had Bulletin Boards that had bad ASP code that would take down the servers. To releive the problem, we decided to develop a customizable Bulletin Board that was coded properly that our clients could use. You can download it from below:

Download Back


Site Counter for ASP Pages

Many of our clients have requested a site counter that would aloow them to track visitors to their sites. We developed a counter for this purpose. The counter is access database enabled and can be downloaded from below.

Once you install the counter mdb in your database directory, add the include file to your includes directory. Next, at the top of the page where you want to count add the following.

<!--#Include Virtual = "/includes/counter.inc" -->

Then below that add the following:

<%

Dim NewHits

GetHits NewHits, 1

%>

You can reset your counter by going into the database and placing the counter back to 0 in the table. This counter only updates by Session, so you will only receive one count for each visit.

Download Back


Replacing adovbs.inc with MetaData Tag

You can use a MetaData tag to replace your adovbs.inc file on our servers. The MetaData tag attaches directly to the DLL where these references are held. Be sure to include this either on data handling pages or in an config.inc file that you are using on the page. Below is the script:

<!--METADATA
TYPE="TypeLib"
NAME="Microsoft ActiveX Data Objects 2.6 Library"
UUID="{00000206-0000-0010-8000-00AA006D2EA4}"
VERSION="2.6"
-->

Back


Setting up an Uploader to upload files

You can upload files to specific directories on your website with a free ASP uploader. First, create the directory you wish to be able to upload to. Next, submit a ticket to support to assign permissions for the uploader to work. Once permissions are assigned you can place this uploader on your site and configure it to upload pages onto your website. The uploader application is downloadable below and the link on the page will give you instructions on how to configure it for your website.

Download Back


Making a database connection in ASP

I use a Function call inside my config.inc file to attach to my database. First I'll show you the function call I created and then how it's called from inside my application. You should also use create a CloseDB to properly destroy all the objects created when your through. Here's the OpenDB function call.Function OpenDB (ByRef Cn)

Set Cn = Server.CreateObject("ADODB.Connection")

With Cn
.ConnectionString = DSNLess
.ConnectionTimeout = 180
.Open
End With

The ConnectionTimeout sets a length of time that the program will work to make a connection. The higher the number, the longer the time. 180 is a good average time for most connections. If you start to receive ODBC errors because of the amount of data in your database you may want to try adjusting this time.

Your first step in retrieving data or inserting data into your database is to create the connection. You call the function call by creating an instance of the connection. See Below.

OpenDB Cn

Cn represents the connection object.

The CloseDB function call closes all the database objects and destroys them from memory. If you don't close the objects and destroy them, you will eventually use us the memory on the server causing it to lock up. As a developer it's your responsibility to insure you destroy all instances. Below is an example of a CloseDB function call.

Function CloseDB()

Cn.Close
Set Cn = Nothing

End Function

This is called from within the program as shown below.

CloseDB

Back

 

We accept VISA, MasterCard, Discover, American Express and eChecks
Copyright 2008 © Badger Web Hosting - All Rights Reserved
157527

Home | Site Comparison | Domains | Find a Domain | Domain Transfers | Purchase a Domain | Renew a Domain | Site Map
Access Databases | SQL Server | MySQL | Add-Ons | Web Design | Video Streaming | Privacy Policy | Our Blog
Terms of Service | Acceptable Use | Manage Your Domain | Copyright Violations | Contact Us | Helpdesk |  View Cart
  Logon to Helm | Logon to Email | Testimonials

BBB of Wisconsin