|
 |
asp_databases thread: One more error in my code that has to do with update statement! :(
Message #1 by "tsivas" <tsivas@o...> on Mon, 10 Dec 2001 19:25:08
|
|
Hello,
I still have problem in another part of the code. Could you please give me
some advice about this?
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>
<META http-equiv="Content-Type" content="text/html; charset=windows-1253">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<%
Dim objCmd
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = objConn
strSQL = "UPDATE Students SET Password = '" & Request.Form("txtnewpwd")
& "' WHERE StudentID= " & Session("StudentID")
objCmd.CommandText = strSQL
objCmd.Execute
Response.Redirect"UserProfile_after.asp"
%>
</BODY>
</HTML>
Here's the error:
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/onlinecampus/UpdatePassword.asp, line 15
Line 15: objCmd.ActiveConnection = objConn
Thank you all,
--tsivas
Message #2 by "Kim Iwan Hansen" <kimiwan@k...> on Mon, 10 Dec 2001 20:39:25 +0100
|
|
response.write "strSQL = " & strSQL
response.end
post the resulting sql string please.
also, you don't need to use the command object either, you can just do
objConn.execute(strSQL)
-Kim
-----Original Message-----
From: tsivas [mailto:tsivas@o...]
Sent: 10. december 2001 19:25
To: ASP Databases
Subject: [asp_databases] One more error in my code that has to do with
update statement! :(
Hello,
I still have problem in another part of the code. Could you please give me
some advice about this?
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>
<META http-equiv="Content-Type" content="text/html; charset=windows-1253">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<%
Dim objCmd
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = objConn
strSQL = "UPDATE Students SET Password = '" & Request.Form("txtnewpwd")
& "' WHERE StudentID= " & Session("StudentID")
objCmd.CommandText = strSQL
objCmd.Execute
Response.Redirect"UserProfile_after.asp"
%>
</BODY>
</HTML>
Here's the error:
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
/onlinecampus/UpdatePassword.asp, line 15
Line 15: objCmd.ActiveConnection = objConn
Thank you all,
--tsivas
$subst('Email.Unsub').
Message #3 by "tsivas" <tsivas@o...> on Mon, 10 Dec 2001 20:27:08
|
|
There's no resulting sql string.The update goes to the database and change
the Students' password.
I want to use the update statement so the users can change their password
periodically. Will I have to add more code?
Please help me if you can!
Thanks a lot,
--tsivas
Message #4 by "Ken Schaefer" <ken@a...> on Tue, 11 Dec 2001 12:24:58 +1100
|
|
www.adopenstatic.com/faq/800a0bb8.asp
objConn is not an open connection, or a connection string is what the error
is telling you.
Where is the code that sets, or opens objConn?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "tsivas" <tsivas@o...>
Subject: [asp_databases] One more error in my code that has to do with
update statement! :(
: Hello,
: I still have problem in another part of the code. Could you please give me
: some advice about this?
: 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>
: <META http-equiv="Content-Type" content="text/html; charset=windows-1253">
: </HEAD>
: <BODY bgcolor="#FFFFFF" text="#000000">
: <%
: Dim objCmd
: Set objCmd = Server.CreateObject("ADODB.Command")
: objCmd.ActiveConnection = objConn
: strSQL = "UPDATE Students SET Password = '" & Request.Form("txtnewpwd")
: & "' WHERE StudentID= " & Session("StudentID")
: objCmd.CommandText = strSQL
: objCmd.Execute
: Response.Redirect"UserProfile_after.asp"
: %>
: </BODY>
: </HTML>
:
: Here's the error:
: ADODB.Command error '800a0bb9'
: Arguments are of the wrong type, are out of acceptable range, or are in
: conflict with one another.
: /onlinecampus/UpdatePassword.asp, line 15
:
:
: Line 15: objCmd.ActiveConnection = objConn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |