on 10-05-2012 3:56 PM
Hi Experts,
I am trying to update a collection's field from a script to a certain value using SQL query with the code below :
Code:
----------------------------------------------------------------------------------
if(supp_regi.equals("N"))
{
temp_email = email_from.replaceAll("[^\\p{Alpha}\\p{Digit}]+","");
dbHandle = session.getDbHandle();
dbHandle.beginTransaction();
temp_r = "R";
mySQL = "UPDATE FCI_DYN_$2147483246 SET Z_SUPP_NAME = 'AK' where Z_SUPP_SC= 'myemailgmailcom'";
dbHandle.executeUpdate(mySQL);
dbHandle.endTransaction();
}
----------------------------------------------------------------------------------
I want this code to update field Z_SUPP_NAME with value AK in extension collection table (FCI_DYN_$2147483246) for the entry where field Z_SUPP_SC's value is myemailgmailcom (this will be a unique entry as per the business scenario_).
This query does not give any error in log but still does not update the required field.
Any helpful inputs please?
Thanks
Tejas
Can you put some logging into the code so we can output what is being captured and what is not.
Something like this:
logInfo(MySQL, temp_r);
Also if you could manage to capture the status of the execute Update and the field you're trying to update that would prove very helpful in debugging this.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.