× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Chuck,
I was trying to put the ENCrypt_AES on the left side of the equation.


On 6/10/2014 11:52 AM, CRPence wrote:
On 10-Jun-2014 09:23 -0500, Gqcy wrote:
I have a simple table, with an encrypted password column:

insert into HIDDNPWDS values
( 'xxxsite'
, 'xxxuserid'
, ENCRYPT_AES('password_value','encryptionpassword')
, 'chgd-date'
, 'comment')

I can only drop the row and insert again....

Only ¿know how to? DELETE the row and then INSERT that row again.? That
is, there is not an error with an UPDATE preventing the request, but
instead an error with the syntax in an attempt to code the UPDATE, and
thus the following inquiry asking how to use UPDATE instead of combining
DELETE and INSERT.?:

How do I structure the UPDATE SET to get the password column to
update???


For example [untested, but AFaIK should function as written]:

create table qtemp/HIDDNPWDS
( Site char(7), UsrId char(10)
, PwdHash char(50) for bit data
, ChgDate date, Comment char(50)
)
;
insert into qtemp/HIDDNPWDS values
('xxxsite'
,'xxxuserid'
,ENCRYPT_AES('password_value','encryptionpassword')
,'chgd-date'
,'comment'
)
;
-- assuming the site + user-id act as an effective primary key:
update qtemp/HIDDNPWDS set
PwdHash = ENCRYPT_AES('new_pwd_value','encryptionpassword')
, ChgDate = current date
where Site = 'xxxsite'
and UsrId = 'xxxuserid'
;



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.