Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] handling single quotes in maintain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] handling single quotes in maintain
 Login/Join
 
Guru
posted
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.
Anil

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Guru
posted Hide Post
Hi,
Can somebody reply to this Please.

Thanks.
Anil


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Virtuoso
posted Hide Post
Anil

What is the error, or what is happening?

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, 2007Report This Post
Master
posted Hide Post
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, 2003Report This Post
Virtuoso
posted Hide Post
Anil / Mark

Single quote should pass through the EDIT box unharmed. I've done a quick get on it and seems to be ok.

I've also passed a similar string to SQL Server, with correct insert results as well.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] handling single quotes in maintain

Copyright © 1996-2020 Information Builders