Added: June/28/2006 at 12:32pm | IP Logged
|
|
|
Hi
Im having problems with cdonts as the new 2003 server wont accept them, below is some code using cdonts can someone advise me what to put in to convert it to cdosys. Greatly appreciate your help
%@LANGUAGE="VBscript" %> <% Response.Buffer = True %> <html> <%
Set oConn = Server.CreateObject("ADODB.Connection") Set oRs = Server.CreateObject("ADODB.RecordSet")
Set oRs= Server.CreateObject("ADODB.RecordSet") oConn.Open "DBQ=" & Server.Mappath(" ") & ";Driver={Microsoft Access Driver (*.mdb)};"
dealer = UCASE(request.form("dealer")) password = UCASE(request.form("password")) contact = request.form("contact") phone = request.form("phone") fax = request.form("fax") emailadd = request.form("emailadd")
Set oConn = Server.CreateObject("ADODB.Connection") Set oRs = Server.CreateObject("ADODB.RecordSet") Set omail = Server.CreateObject("ADODB.RecordSet") oConn.Open "DBQ=" & Server.Mappath("/databases/dawn.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
sql2 = "insert into signup(dealer, contact, phone, fax, email, password) values ('"& dealer &"','"& contact &"','"& phone &"','"& fax &"','"& emailadd &"','"& password &"')" set oRs = oConn.execute(sql2)
'******************************
sql3 = "select * from signup where email = '"& emailadd &"'" set omail = oConn.execute(sql3) 'response.write(dealer)
'sets variables email = omail("email") 'chooses username and password from database that correspond 'to submitted email address. user = omail("dealer") tel = omail("phone") contact = omail("contact") Set sendmail = Server.CreateObject("CDONTS.NewMail")
'put the webmaster address here sendmail.From = email
'The mail is sent to the address entered in the previous page. sendmail.To = " "
'Enter the subject of your mail here sendmail.Subject = "New Vendor Request"
'This is the content of thr message. sendmail.Body = "The following Vendor has requested signup: " &_ vbCrlf & vbCrlf & "Company: " & user & _ vbCrlf & "Contact: " & contact & _ vbCrlf & "Telephone No: " & tel & vbCrlf
'this sets mail priority.... 0=low 1=normal 2=high sendmail.Importance = 2
sendmail.Send 'Send the email! Set sendmail = Nothing response.redirect "doneit.asp" %> </html>
|