[cisco-voip] UCCX Scripting and SQL 2005 ENCRYPTBYPASSPHRASE
Anthony Holloway
avholloway+cisco-voip at gmail.com
Thu Aug 5 14:47:54 EDT 2010
I don't know the answer but:
It's possible that UCCX does not support variables inside of sql functions
such as this. One way to test that is to remove $sCCNumber, and replace it
with a String literal such as "00000000000000" and see if that works. If it
does, then it's a problem with using variables inside of functions. You did
say you can insert $sCCNumber if you don't use the function correct?
It's also possible that UCCX expects a document when using this sql
function. So create a new Document variable and cast your sCCNumber like
this as a test:
Set myDocumentVariable = (Document) sCCNumber
Anthony
On Wed, Aug 4, 2010 at 4:22 PM, Teixeira, Mike <mwteixeira at bendbroadband.net
> wrote:
> Hello,
>
>
>
> I am trying to use encryptbypassphrase an SQL 2005 SQL encryptiong with our
> UCCX 7.0 installation. The DB-Write is throwing an ArrayindexOutOfBounds
> Exception. I used to use a bitwise operation to store the data but this
> seems so much cleaner and secure.
>
>
>
> When I view the db-fields using the DB-Write method the column in
> question(CCNumber) is showing up as a com.cisco.doc.Document. While the
> column is actually a varbinary(50). If I remove the encryptbypassphrase line
> from the SQL statement the data inserts without error. The variable that I
> am passing the encryptbypassphrase statement, is a string. I have tried a
> string, and a bigint. Do I need to create a document object variable for
> this to work? If so, how do I cast a string to the document variable? Can I
> even cast a string to a document variable?
>
>
>
> Mike
>
>
>
> Here is the SQL Statement.
>
>
>
> INSERT INTO PayByPhone
>
> (house, cust, CCNumber, CCExpMonth, CCExpYear, PaymentAmount, Processed,SubmittedOn
> )
>
> VALUES ($LHouse, $iCust,
>
> ENCRYPTBYPASSPHRASE('thisismypassphraseNotreallyIchangedit',$sCCnumber),
>
> $LCCExpMonth, $LCCExpYear, $dblPaymentAmount, '0', GETDATE());
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20100805/b8d1f292/attachment.html>
More information about the cisco-voip
mailing list