How long since binary (password) field changed?

In MS SQL Server 2000, a financial application database stores passwords in a table SY01400 as a binary field.  The field is [SY01400.password].
PROBLEM:  I would like a way to determine how long it has been since the password was changed, so that I can remind the user to change their password.

I've tried to create a temporary table to store the userid and password as of a given date, and then test at some later time to see if the password has changed in the SY01400 table.  

However, any comparisons that I use don't detect changes in the password, because it's binary.

Ideas?

Thanks,
-Carl
carlisaacsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

acampomaCommented:
Create a trigger on the table to update a datetime field another table that corresponds to a userid
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
carlisaacsonAuthor Commented:
how does the trigger determine if the password was changed?
0
SireesCommented:
Detect changes to database table /column

http://www.codeproject.com/cs/database/DetectDataChanges.asp
0
carlisaacsonAuthor Commented:
Thanks ACampona & Sirees.

Earlier I found this article and used it on Northwinds successfully. I modified it slightly so instead of detecting changes to the row, it detected changes to a particular field.  I tried to adapt it to my situation in my database by having the binary_checksum test for changes to the password field.  

CREATE   TABLE tbl_BinaryCheckPassword (USERID char, BCHECKSUM binary)
INSERT   INTO tbl_BinaryCheckPassword
         SELECT   USERID, BINARY_CHECKSUM(password)
         FROM      SY01400

When i run this, I get an error message:
Server: Msg 8152, Level 16, State 9, Line 2
String or binary data would be truncated.
The statement has been terminated.

That's why I ended up coming here.  

I'm going to check for answers to that error message, and if still have questions, I will post another question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.