We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


How long since binary (password) field changed?

carlisaacson asked
Medium Priority
Last Modified: 2008-01-09
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.


Watch Question

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


how does the trigger determine if the password was changed?
Detect changes to database table /column



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
         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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.