Form Won't Submit
Posted: Thu Sep 13, 2012 4:15 am
I'm having troubles getting this form to work. I've dumped my entire asp page on here - but it just won't submit. I've verified that everything lines up with SQL - is there something wrong with the form?
Code: Select all
Dim QUERY_STRING_INFO
QUERY_STRING_INFO = Replace(Request.QueryString("Id"), "{", "'")
QUERY_STRING_INFO = Replace(QUERY_STRING_INFO, "}", "'")
SQLString = "SELECT * FROM CRMLead WHERE Id = '" & request.QueryString("Id") & "';"
Set rsUsersMod = Server.CreateObject("ADODB.Recordset")
'Then open the record we want
rsUsersMod.Open SQLString,dbConn,adLockReadOnly,adOpenDynamic
SQLStringLeads = "SELECT * FROM CRMTask WHERE WhoId ='" & request.QueryString("Id") & "' ORDER BY ActivityDate DESC;"
Set rsTasks = Server.CreateObject("ADODB.Recordset")
rsTasks.Open SQLStringLeads,dbConn,adLockReadOnly,adOpenDynamic
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
' Update data into orders table
'First check the user input and the action selected
If Request.Form("update") = "modifylead" Then
strSQL ="UPDATE CRMLead SET " &_
"FirstName = '" & Request.Form("FirstName") & "', " &_
"LastName = '" & Request.Form("LastName") & "', " &_
"Email = '" & Request.Form("Email") & "', " &_
"Company = '" & Request.Form("Company") & "', " &_
"Street = '" & Request.Form("Street") & "', " &_
"City = '" & Request.Form("City") & "', " &_
"State = '" & Request.Form("State") & "', " &_
"PostalCode = '" & Request.Form("PostalCode") & "', " &_
"Phone = '" & Request.Form("Phone") & "', " &_
"WHERE Id = '" & Request.Form("recordid") & "';"
dbConn.Execute(strSQL)
IF ((Session("Level") = "Admin")) Then
ErrorMess = "Information Has Been Updated!"
Else
Response.Redirect("crm_user.asp?id=" & rsUsersMod.Field.Item("Id").Value & "")
End If
End If