Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 23rd, 2006, 12:21 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default "ALTER USER ..." commandproblem

Hello Forum Members,

I am experiencing very interesting problem in my ASP.NET application when I am changing the user password in ORACLE database using "ALTER USER..." command from inside of my code.
Example:
The user "TestUserName" has the current password, let's say "User1".
After I change the password to "User2", I can login into my application with the OLD and with the NEW passwords by some reason?
If I check the password for the current "TestUserName" in the database, it has the newest value ("User2"). From the SQLPlus I can login into the database only with the newest password. But from my application I can still login using both passwords? If I close the application, close the browser and start the application again, I still can login using two passwords. But, if I restart the PC, the old password disappeared. What is going on?

Any suggestions?

Thanks in advance,
-Dmitriy
 
Old October 23rd, 2006, 12:25 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What do you mean the "old password disappeared"?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old October 23rd, 2006, 12:36 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The "old password disappeared" means I can use only the newest password "User2" after the PC has been restarted. The password "User1" does not work anymore.
 
Old October 23rd, 2006, 12:41 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In your example, TestUserName, is this a user who is logged into a forum or the username embeded in your query string used to access the database?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old October 23rd, 2006, 12:58 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

In my example the "TestUserName" is the value of the variable sUserId I place into the command string. This is the fragment from the code I am using:

 'Begin Transaction here:
                objTransaction = CType(wsDataBasesService.GetMERCURYConnection(), OracleConnection).BeginTransaction()

                sUserId = Trim(txtUserID.Text)
                sPassword = Trim(txtPasswordAgain.Text)

                sCommandText = "ALTER USER " & sUserId & " IDENTIFIED BY " & sPassword & ""
                cmd = New OracleCommand("", CType(wsDataBasesService.GetMERCURYConnection(), OracleConnection))
                cmd.CommandType = CommandType.Text
                cmd.CommandText = sCommandText
                cmd.ExecuteNonQuery()
                ''cmd.Transaction = objTransaction
                cmd.Dispose()
                cmd = Nothing

                'Commit transaction and dispose:
                objTransaction.Commit()
                objTransaction.Dispose()
                objTransaction = Nothing
 
Old October 23rd, 2006, 01:13 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It doesn't make sense to me since the value for oracle is persisted on that server and it should kick out any attempt to login with an incorrect username and password. Since restarting the PC is the only thing that works, it seems like something is being persisted until you restart the machine, a cookie maybe. In any case there is no reason why this should be happening.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
What do I need to add/alter? obrienkev C# 2005 1 November 1st, 2007 12:04 PM
Alter Column SQLScott SQL Server 2005 5 January 5th, 2007 11:53 AM
"ALTER USER.." command problem Dmitriy Oracle ASP 0 October 23rd, 2006 12:24 PM
Alter in View rekha_jsr Oracle 1 December 3rd, 2004 09:17 AM
ALTER TABLE Daniel Schaffer Access ASP 0 April 25th, 2004 12:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.