Hi,
I tried to encrypt my data using the dojox.sql.ENCRYPT() function. But I got an error which says
"SQL Exception: The destId parameter must be an int.". Can you please help me to resolve this issue ? Following are the table structure & insert command which I tried.
dojox.sql("CREATE TABLE MiscData ("
+ "KEY TEXT, "
+ "VALUE TEXT "
+ ")"
);
dojox.sql("INSERT INTO MiscData VALUES( ENCRYPT(?),?)","A","B","ABC",function(results, error, errorMsg){
alert(error);
alert(errorMsg);
if(error){ alert(errorMsg); return; }
});
I greatly appreciate your help on this.
Thanks,
Ramesh

destId parameter error while using ENCR/DECR in Google gears
Ramesh,
I am getting same error when I try to use ENCRYPT or DECRYPT function in my insert/select query.
I am not sure whether anyone has encountered same problem of destId parameter and have any fix for that.
Meanwhile I could figure out some part that might be causing this problem as follows
The workerID that is used inside dojox._sql._crypto is a string
If you change it's type to int then above destId parameter related error goes
//Actual Code
this._manager.sendMessage(msg, workerID);
//New Code
this._manager.sendMessage(msg, parseInt(workerID));
However eventhough it fixes error of "The destId parameter must be an int", you will see one more
new error after this as follows
"Error in worker 1. Could not process message because worker does not have an onmessage handler."
In above error message 1 is worker Id.I am still struggling to resolve this new error.
Regards,
Melwin
Re:Problem in ENCRYPT() function
Missed one point in above topic
I have observed this problem only in Mozilla Firefox and not on IE