Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL keyword used as filename Error

Status
Not open for further replies.

smallredville

Programmer
Aug 18, 2008
115
SG
Hi All,

Recently my colleagues used a file name of SQL keywords such as "insert.odt", "update.odt".

When the JAVA batch program did the processing (JAR file of LAPI 9.7 was used), it gave the following errors:

+++ Start of session errors +++
Status Code: 106603
Api Error:
Error Message:
Status Message: There is illegal string "insert" in the query string
+++ End of session errors +++

Does the above error means, those SQL keyword like insert, update should not be used as document's name?

Hope someone who encountered similar issue before can share with me on this post or maybe anyone who has any feedback. =)

Thank You in advance,
smallredville

 
I can confirm that on 971 you can add these files via the browser, I'll leave those more experienced with LAPI to comment on the LAPI front.

The keywords don't appear in the Naming Conventions document (
I do recall there was an issue with a security patch to stop Cross Site Scripting which blocked allsorts of characters and keywords, this may be the issue.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
106603 does not appear in my version of les971.could it be a wrapper api that somebody wrote in your place.Is the actionfailing on createobjecex and createversion for you or somewhere else

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
Hi Appnair and ggriffit,

Thanks for the reply.

To be more specific the errors

+++ Start of session errors +++
Status Code: 106603
Api Error:
Error Message:
Status Message: There is illegal string "insert" in the query string
+++ End of session errors +++

occurs when I called the ListObjects with objectName to include keyword such as "delete data.odt" or "insert data.odt" etc.

Below is my ListObjects section:

if ((status = doc.ListObjects(filetoVolumeID, fileto, null, "NAME = '" + objectName + "'", 0, results)) != 0)
{
LivelinkHandler.writeSessionErrors(GlobalVariables.session);
return false;

}//end if


Any feedbacks are greatly appreciated.

Thank you very much =)
smallredville
 
your livelink server is running this patch called
called pat08100.txt I can see that error is set after you do that
Code:
queryBlackList = GetPrefList( sysPref, 'Lapi', 'ListNodesQueryBlackList', {'commit',';','drop','alter','update','insert','delete','create', 'set'} )
					
					retStatus = CheckAgainstList( .fInArgs.QueryStr, queryBlackList, FALSE )
					
					if ( !retStatus.OK )
					
						ok = FALSE
						._SetError( 106603, retStatus.errMsg )
					end


Hope that helps or let us know if you want to know how to get around it

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
 
Hi Appnair,

Thanks for the reply.

Really appreciate that =)

May I know how to get around with it?

many thanks in advance =)
smallredville
 
The code is managed by :

queryBlackList = GetPrefList( sysPref, 'Lapi', 'ListNodesQueryBlackList', {'commit',';','drop','alter','update','insert','delete','create', 'set'} )

either remove the values from the opentext.ini file :

[LAPI]
ListNodesQueryBlackList = {xxx}

if present or you can remove it from the default part of the queryBlackList line above to be safe.

Bear in mind that this will open up a potential security hole, so it may be worth checking with OT about this as there is a write up on the issue at
Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thanks Greg and Appnair =)

Appreciate your feedbacks very much =)

smallredville
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top