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
Files\System\ado\msado15.dll" -
> ->
> <HTML>
> <HEAD>
> <TITLE>Update Password</TITLE>
> </HEAD>
> <BODY bgcolor="#FFFFFF" text="#000000">
> <%
> Dim objCmd
> Set objCmd = Server.CreateObject("ADODB.Command")
> strSQL = "UPDATE Students SET Password = '" & Request.Form
("txtnewpwd")
> & "' WHERE StudentID = & Session("StudentID")
> objCmd.CommandText = strSQL
> objCmd.CommandType = adCmdText
> Set objCmd.ActiveConnection = objConn
> objCmd.Execute
> Response.Redirect"UserProfile_after.asp"
> %>
> </BODY>
> </HTML>
>
> 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!
> --tsivas