Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Hosting Requirements (HELP PLEASE)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Hosting Requirements (HELP PLEASE)

 Post Reply Post Reply
Author
eddyb View Drop Down
Newbie
Newbie


Joined: 06 August 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eddyb Quote  Post ReplyReply Direct Link To This Post Topic: Hosting Requirements (HELP PLEASE)
    Posted: 26 August 2003 at 5:17am

I am running the script below on 1asphost.com but it is too slow and unrelible so I am going to move to a paid host.

What requirements do I need. Do i need mySQL? MSSQL? (what the difference anyway?)

I need to send an email from the script. See below. Do I need a certain requirement for that too? Can anyone recommend a good host that will meet my needs?

The script is: (I have removed some of the varibles for simplicity)

<%
'Dimension variables
Dim adoCon              'Holds the Database Connection Object
Dim rsAddComments   'Holds the recordset for the new record to be added
Dim strSQL               'Holds the SQL query to query the database

'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")

'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("research.mdb")

'Create an ADO recordset object
Set rsAddComments = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM tbdata;"

'Set the cursor type we are using so we can navigate through the recordset
rsAddComments.CursorType = 2

'Set the lock type so that the record is locked by ADO when it is updated
rsAddComments.LockType = 3

'Open the recordset with the SQL query
rsAddComments.Open strSQL, adoCon

'Tell the recordset we are adding a new record to it
rsAddComments.AddNew

'Add a new record to the recordset
rsAddComments.Fields("company") = Request.Form("company")
rsAddComments.Fields("contact") = Request.Form("contact")
rsAddComments.Fields("title") = Request.Form("title")
rsAddComments.Fields("location") = Request.Form("location")
rsAddComments.Fields("method") = Request.Form("method")
rsAddComments.Fields("phone") = Request.Form("phone")
rsAddComments.Fields("staff") = Request.Form("staff")
rsAddComments.Fields("date") = Request.Form("date")
rsAddComments.Fields("willing") = Request.Form("willing")
rsAddComments.Fields("reason") = Request.Form("reason")

'Write the updated recordset to the database
rsAddComments.Update

'Reset server objects
rsAddComments.Close
Set rsAddComments = Nothing
Set adoCon = Nothing
'This will create the mail sending object.
Set Mail = Server.CreateObject("Persits.MailSender")

'First you need to set the hostname of the mail server you want 'the mail object to use and who the mail is from.
Mail.Host = "myhost"
Mail.From = "ed@myemail.com"   'The From part has the e-mail address.
Mail.FromName = "Ed"   'The FromName is a user friendly name for the sender.

'Now you need to set the destination of the e-mail the address of who it is to.
Mail.AddAddress "ed@myemail.com, "Ed"

'Now you need to just give the actual message to send. 
Mail.Subject = "Solve Research Results"  'You need a subject
Mail.Body = "Company = "+Request.Form("company")+", Contact = "+Request.Form("contact")+", Title = "+Request.Form("title")+", Location = "+Request.Form("location")+", Method = "+Request.Form("method")+", Phone = "+Request.Form("phone")+", Staff = "+Request.Form("staff")+", Date = "+Request.Form("date")+", Willing = "+Request.Form("willing")+", Reason = "+Request.Form("reason")

'Now you just need to send it...
Mail.Send

'It is always good to check for errors, the MailSender object supports the Err object.
If Err <> 0 Then
Response.Write "Letter was not sent due to the following error: " & Err.Description
else
Response.Redirect "/thanks.htm"
end if

%>

 

Many Thanks,

Ed

Back to Top
email View Drop Down
Newbie
Newbie


Joined: 23 March 2003
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote email Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2003 at 1:34pm
Originally posted by eddyb eddyb wrote:

What requirements do I need. Do i need mySQL? MSSQL? (what the difference anyway?)

None... you have an access database there.

Suggestion: Take a course on ASP.

I am not being rude here, seriously if you want to learn the language that's the way to go... you'll save a lot of time and energy that way.

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.