Click here to Skip to main content
15,886,714 members
Home / Discussions / Database
   

Database

 
AnswerRe: Strength of MSAccess 2007. Pin
Mycroft Holmes6-Mar-10 2:37
professionalMycroft Holmes6-Mar-10 2:37 
QuestionSqlConnection - to keep around or dispose Pin
treefirmy5-Mar-10 18:49
treefirmy5-Mar-10 18:49 
AnswerRe: SqlConnection - to keep around or dispose Pin
Eddy Vluggen6-Mar-10 1:24
professionalEddy Vluggen6-Mar-10 1:24 
QuestionIs there a way to change a column property in a table without having to delete the entire table? Pin
tonyonlinux4-Mar-10 8:43
tonyonlinux4-Mar-10 8:43 
AnswerRe: Is there a way to change a column property in a table without having to delete the entire table? Pin
Luc Pattyn4-Mar-10 9:05
sitebuilderLuc Pattyn4-Mar-10 9:05 
GeneralRe: Is there a way to change a column property in a table without having to delete the entire table? Pin
tonyonlinux4-Mar-10 9:19
tonyonlinux4-Mar-10 9:19 
GeneralRe: Is there a way to change a column property in a table without having to delete the entire table? Pin
Tim Carmichael4-Mar-10 10:18
Tim Carmichael4-Mar-10 10:18 
QuestionEncrypt/Decrypt Password Field in Sybase Pin
MWRivera4-Mar-10 5:42
MWRivera4-Mar-10 5:42 
Hi All,

I ran into an issue when trying to Decrypt a password field that I had previously encrypted and was hoping someone could help. I'm using SQL Anywhere 10.

I encrypted the password field with no issues, using the following trigger when a new record was added to the table:

ALTER TRIGGER "encrypt_new_user_pwd" BEFORE INSERT
ORDER 1 ON "QAS"."tableName"
REFERENCING NEW AS newPwd
FOR EACH ROW
BEGIN
Set newPwd.pwdField = ENCRYPT(newPwd.pwdField , 'key')
END


The problem is I'm unable to decrypt the password of the newly created record (fieldID = 0002), using the following:

SELECT CAST (DECRYPT(pwdField, 'key') AS VARCHAR(100))
FROM "QAS"."tableName" WHERE fieldID = '0002'

In Sybase when trying to execute the above statement I get the following error:

Interactive SQL
The following error occurred while fetching results:
Decryption error: Input must be a multiple of 16 bytes in length for AES
SQLCODE=-851, ODBC 3 State="08001"



Do you have any idea what's causing this error?

The pwdField is of type VARCHAR and size 15.

Thanks,
Mel
AnswerRe: Encrypt/Decrypt Password Field in Sybase Pin
David Skelly5-Mar-10 2:06
David Skelly5-Mar-10 2:06 
GeneralRe: Encrypt/Decrypt Password Field in Sybase Pin
MWRivera5-Mar-10 9:08
MWRivera5-Mar-10 9:08 
QuestionHelp on using Transaction Pin
Saiyed Alam4-Mar-10 5:00
Saiyed Alam4-Mar-10 5:00 
AnswerRe: Help on using Transaction Pin
Not Active4-Mar-10 5:45
mentorNot Active4-Mar-10 5:45 
Questiondesign a database to store an expression tree [modified] Pin
deostroll4-Mar-10 2:06
deostroll4-Mar-10 2:06 
AnswerRe: design a database to store an expression tree Pin
Mschauder5-Mar-10 2:45
Mschauder5-Mar-10 2:45 
QuestionADO.NET Batch Update Pin
MB_KSU3-Mar-10 11:59
MB_KSU3-Mar-10 11:59 
AnswerRe: ADO.NET Batch Update Pin
Mycroft Holmes3-Mar-10 21:32
professionalMycroft Holmes3-Mar-10 21:32 
GeneralRe: ADO.NET Batch Update Pin
MB_KSU4-Mar-10 3:56
MB_KSU4-Mar-10 3:56 
GeneralRe: ADO.NET Batch Update Pin
Mycroft Holmes4-Mar-10 11:14
professionalMycroft Holmes4-Mar-10 11:14 
Questioncalling stored procedure in case statement - Sql Server 2000 Pin
vamsimohan212-Mar-10 23:41
vamsimohan212-Mar-10 23:41 
AnswerRe: calling stored procedure in case statement - Sql Server 2000 Pin
The Man from U.N.C.L.E.3-Mar-10 1:43
The Man from U.N.C.L.E.3-Mar-10 1:43 
AnswerRe: calling stored procedure in case statement - Sql Server 2000 Pin
Pranay Rana3-Mar-10 19:04
professionalPranay Rana3-Mar-10 19:04 
GeneralRe: calling stored procedure in case statement - Sql Server 2000 Pin
Mycroft Holmes3-Mar-10 21:29
professionalMycroft Holmes3-Mar-10 21:29 
AnswerRe: calling stored procedure in case statement - Sql Server 2000 Pin
The Man from U.N.C.L.E.3-Mar-10 22:48
The Man from U.N.C.L.E.3-Mar-10 22:48 
QuestionWhats wrong with SQL statement? Pin
gengel2-Mar-10 19:47
gengel2-Mar-10 19:47 
AnswerRe: Whats wrong with SQL statement? [modified] Pin
Jörgen Andersson2-Mar-10 21:48
professionalJörgen Andersson2-Mar-10 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.