Forum Moderators: open
Ok here’s my situation, I have just started a new job and it was going well until I was given a project, seems simple. But! My employees want me to use there specific code which works, but not for me. I have tried to debug the code, taking examples for working code etc but it just does not want to work for me... need help. I hate being in a situation were I feel useless.
Here is the thing:
Adding to a SQL db using asp. The code uses a lot of stored procedures and tables.
2 pages
1 page is a form that adds to the db.
2 page has the functions that update or add the db.
here the function that the first page calls.
Sub updateDonor(strFirstname, strLastname, strEmail, strTel, intCountryID,strAddress1, strAddress2, strAddress3, strAddress4, strAddress5, strAddress6, _
strTitle,intCustomerID)
Dim intDonorID
Dim strSql
Dim arrRS
Dim objSmtp
Dim strBody
intDonorID = findDonor(strEmail, strFirstname, strLastname)
strSql = ""
'Response.Write "intDonorID : " & intDonorID & "<br>"
If CLng(intDonorID) > 0 Then
strSql = "exec sp_updateDonor '" & strFirstname & "'," _& "'" & strLastname & "'," _& "'" & strAddress1 & "'," _& "'" & strAddress2 & "'," _& "'" & strAddress3 & "'," _& "'" & strAddress4 & "'," _& "'" & strAddress5 & "'," _& "'" & strAddress6 & "'," _& intCountryID & "," _& "'" & strEmail & "'," _& "'" & strTel & "'," _& intCustomerID & "," _& intDonorID
arrRS = Exec_SQL(strSql, cUpdateRS)
Else
strSql = "exec sp_insertDonor '" & strFirstname & "'," _& "'" & strLastname & "'," _& "'" & strAddress1 & "'," _& "'" & strAddress2 & "'," _
& "'" & strAddress3 & "'," _& "'" & strAddress4 & "'," _& "'" & strAddress5 & "'," _& "'" & strAddress6 & "'," _& intCountryID & "," _& "'" & strEmail & "'," _& "'" & strTel & "',''," _& "'" & strTitle & "'," _& intCustomerID
arrRS = Exec_SQL(strSql, cInsertRS)
strBody = "The following registered." & vbCrLf & vbCrLf _
& strTitle & " " & strFirstname & " " & strLastname & vbCrLf & vbCrLf _& strAddress1 & vbCrLf _& strAddress2 & vbCrLf _& strAddress3 & vbCrLf _& strAddress4 & vbCrLf _& strAddress5 & vbCrLf _& strAddress6 & vbCrLf & vbCrLf _& strEmail & vbCrLf & vbCrLf _& strTel & vbCrLf & vbCrLf & vbCrLf _
& "*** This is an automated email, do not reply ***"
Set objSmtp = Server.CreateObject("SMTPsvg.Mailer")
With objSmtp
.RemoteHost = ""
.FromName = ""
.FromAddress = ""
.AddRecipient ""
.AddBCC ""
'.AddRecipient ""
.Subject = "*** Donor Registration ***"
.BodyText = strBody
If .SendMail Then
'Response.Write "Sent"
Else
'Response.Write objSmtp.Response
End If
End With
Set objSmtp = Nothing
End If
End Sub
a bit long sorry, i also had to edit the code a bit please forgive me it is abussibess website
it looks pretty simple,i know but it is just not working for me.
please help..