As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, I have a edit box on the maintain screen through which value is coming and it is used in sql query further. Everything works fine but when value with single quote (')is passed through edit box, the sql query fails. Can someone please help me in handle this scenario.
compute adis/i11;
compute SQLADDUSER/A100V = "insert into test values ('ABC','"|testvar|"');";
adis=sys_mgr.engine("SQLORA","SET DEFAULT_CONNECTION CONN_PROJ" );
adis=sys_mgr.engine("SQLORA",SQLADDUSER);
adis=sys_mgr.engine("SQLORA","commit");
Thanks. AnilThis message has been edited. Last edited by: <Kathryn Henning>,
I would tend to use a0 format for testvar and SQLADDUSER, which I have used and it works for me. The a100v format will give a fixed length variable when used, despite having a variable format. a0 is the most useful for this type of process.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Anil In this scenario is testvar the value that is being passed in from the editbox? If so, is a single quote a valid value? If not you can use JavaScript to make sure that a single quote is not passed in. If it IS a valid character, is the error coming from the compute statement or the SQL insert statement?
WebFOCUS has the QUOTEDSTRING command, but I don't think that will work in Maintain. We may have to pass the variables to a Focexec using the EXEC command and do the SQL INSERT there.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003