PLEASE Help, Hellish Update syntax error again (8.02)

PLEASE Help, Hellish Update syntax error again (8.02)

Post by MaryAnn-Ta » Sun, 03 Dec 2006 02:39:37


would be grateful if anyone could help out on this. I am completely at
loss as to what is going on.
Somehow DW8.02 does not properly generate syntax for update, delete, insert
etc.
All my files work properly on DWMX but bringing them over to DW8.02 has led
to great difficulties, missed deadlines etc.
In this instance I have reapplied the server behaviours in dw8.02, removed
the serverScripts, started from scratch even! but still get an UPDATE syntax
error.
The erroneous code is being generated by Dreamweaver! The situation is
really become hellish

I have pasted the relevant section of the code below:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/Nigeriapharm.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" &
Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_update")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd

Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_Nigeriapharm_STRING
MM_editCmd.CommandText = "UPDATE RegisterGeneral SET UserName = ?,
Password = ?, Promotions = ?, Title = ?, FirstName = ?, Surname = ?,
Telephone = ?, Email = ? WHERE RegisterID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202,
1, 50, Request.Form("Username")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202,
1, 50, Request.Form("Password")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202,
1, 50, Request.Form("Promotions")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202,
1, 50, Request.Form("Title")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202,
1, 50, Request.Form("FirstName")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202,
1, 50, Request.Form("Surname")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5,
1, -1, MM_IIF(Request.Form("Telephone"), Request.Form("Telephone"), null)) '
adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202,
1, 50, Request.Form("Email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 5,
1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"),
null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "UserUpdateSuccess.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim rsUserUpdate__MMColPa
 
 
 

PLEASE Help, Hellish Update syntax error again (8.02)

Post by Paul Whith » Wed, 06 Dec 2006 09:28:39

he syntex error is being caused because PASSWORD is a reserved word now,
whereas it never used to be. Try changing the name of the field to something
like UserPassword

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"MaryAnn-Tade's Studio" < XXXX@XXXXX.COM > wrote in message
news:ekppc3$gpn$ XXXX@XXXXX.COM ...



 
 
 

PLEASE Help, Hellish Update syntax error again (8.02)

Post by MaryAnn-Ta » Wed, 06 Dec 2006 20:40:50

hanks Paul, worked like magic. Wasn't magic though, just your expertise:)
"Paul Whitham AdobeCommunityExpert" < XXXX@XXXXX.COM > wrote in message
news:el2efo$kkc$ XXXX@XXXXX.COM ...