Advertisement
| 05.09.2008 at 03:04AM PDT, ID: 23388804 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: |
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsAddCatentry '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 "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & "D:\customer\eurobusxpo\database\cat_entry_info.mdb"
'Create an ADO recordset object
Set rsAddcatalogueentry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblcatalogueentry.Contact_name, tblcatalogueentry.Stand_number, tblcatalogueentry.Contact_email, tblcatalogueentry.ad_1, tblcatalogueentry.ad_2, tblcatalogueentry.ad_3, tblcatalogueentry.ad_4, tblcatalogueentry.ad_5, tblcatalogueentry.Postcode, tblcatalogueentry.Company_name, tblcatalogueentry.Tel, tblcatalogueentry.Fax, tblcatalogueentry.Website, tblcatalogueentry.CPT_Member, tblcatalogueentry.Company_description, tblcatalogueentry.Product_type FROM tblcatalogueentry;"
'Set the cursor type we are using so we can navigate through the recordset
rsAddcatalogueentry.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rsAddcatalogueentry.LockType = 3
'Open the recordset with the SQL query
rsAddcatalogueentry.Open strSQL, adoCon
'Tell the recordset we are adding a new record to it
rsAddcatalogueentry.AddNew
'Add a new record to the recordset
rsAddcatalogueentry.Fields("Contact_name") = Request.Form("name")
rsAddcatalogueentry.Fields("Stand_number") = Request.Form("stand_no")
rsAddcatalogueentry.Fields("Contact_email") = Request.Form("email")
rsAddcatalogueentry.Fields("Company_name") = Request.Form("cname")
rsAddcatalogueentry.Fields("Ad_1") = Request.Form("Address_1")
rsAddcatalogueentry.Fields("Ad_2") = Request.Form("Address_2")
rsAddcatalogueentry.Fields("Ad_3") = Request.Form("Address_3")
rsAddcatalogueentry.Fields("Ad_4") = Request.Form("Address_4")
rsAddcatalogueentry.Fields("Ad_5") = Request.Form("Address_5")
rsAddcatalogueentry.Fields("Postcode") = Request.Form("P_code")
rsAddcatalogueentry.Fields("Tel") = Request.Form("tel_no")
rsAddcatalogueentry.Fields("Fax") = Request.Form("fax_no")
rsAddcatalogueentry.Fields("Website") = Request.Form("webs")
rsAddcatalogueentry.Fields("CPT_member") = Request.Form("cpt")
rsAddcatalogueentry.Fields("Company_description") = Request.Form("comp_des")
rsAddcatalogueentry.Fields("Product_type") = Request.Form("Prod_list")
'Write the updated recordset to the database
rsAddcatalogueentry.Update
'Reset server objects
rsAddcatalogueentry.Close
Set rsAddcatalogueentry = Nothing
Set adoCon = Nothing
Dim objEmail 'stores mailer control instance
Set objEmail = Server.CreateObject("Dundas.Mailer")
'Mailer object
objEmail.TOs.Add(Request.Form("email"))
objEmail.BCCs.Add("helen.conway@expom.co.uk")
objEmail.FromAddress = "Eurobus Expo 2008 Website (Do Not Reply)<info@eurobusxpo.com>"
objEmail.Subject = "Eurobus Catalogue Entry Form :"
' use either of these two servers
objEmail.SMTPRelayServers.Add "smtp.altohiway.com"
objEmail.SMTPRelayServers.Add "smtp.mailcontroller.altohiway.com"
'Declare a new variable
Dim HTMLBody
HTMLBody = "The following is feedback from my web site." & vbcrlf & vbcrlf
HTMLBody = HTMLBody & "First Name: " & request.form("name") & vbCrLf
objEmail.HTMLBody = "Thank you for submitting your Free Catalogue Entry for Euro Bus Expo 2008. Your Details Entered are as follows: " & "<br>"_
& "Contact Name: " & Request.Form("name") & "<br>"_
& "Stand Number: " & Request.Form("Stand_no") & "<br>"_
& "Email Address: " & Request.Form("email") & "<br>"_
& "Company Name: " & Request.Form("Cname") & "<br>" _
& "Address 1: " & Request.Form("Address_1") & "<br>" _
& "Address 2: " & Request.Form("Address_2") & "<br>" _
& "Address 3: " & Request.Form("Address_3") & "<br>" _
& "Address 4: " & Request.Form("Address_4") & "<br>" _
& "Address 5: " & Request.Form("Address_5") & "<br>" _
& "Postcode: " & Request.Form("P_code") & "<br>" _
& "Telephone Number: " & Request.Form("tel_no") & "<br>" _
& "Website: " & Request.Form("webs") & "<br>" _
& "CPT Member: " & Request.Form("cpt") & "<br>" _
& "Company Description: " & Request.Form("comp_des") & "<br>" _
& "Product Description: " & Request.Form("Prod_list") & "<br>" _
& "Completed"
objEmail.SendMail
'Redirect to the guestbook.asp page
Response.Redirect "exhibitors_cat_entry_complete.asp"
%>
|
Advertisement