Try making that statment on one line.
> Hi all,
> I have a problem that has to do with update statement.Could anybody help
> me? I'm using an Access database with OLE-DB Connection.
> I have created a form with 3 text fields that a user fills with the old
> password,the new password and the confirmation of the new password.
> Here's the code:
> <!-- #include file="DataStore.asp" -->
> <!-- METADATA TYPE="typelib"
> FILE="C:\Program Files\Common
> <TITLE>Update Password</TITLE>
> <BODY bgcolor="#FFFFFF" text="#000000">
> Dim objCmd
> Set objCmd = Server.CreateObject("ADODB.Command")
> strSQL = "UPDATE Students SET Password = '" & Request.Form
> & "' WHERE StudentID = & Session("StudentID")
> objCmd.CommandText = strSQL
> objCmd.CommandType = adCmdText
> Set objCmd.ActiveConnection = objConn
> Here's the error:
> Error Type:
> Microsoft VBScript compilation (0x800A0409)
> Unterminated string constant
> /onlinecampus/UpdatePassword.asp, line 15, column 76
> strSQL = "UPDATE Students SET Password = '" & Request.Form("txtnewpwd")
> & "'
> What am I doing wrong??
> Thank you!