Sunday, 9 December 2012
Friday, 7 December 2012
SQLExec : Return: 8015 - Bind value is too long
You get this error in an online page or while running a Application engine program. This error happens when you try to insert more than 254 characters in a long field using sqlexec and do not use %TextIn meta sql.
Resolution
Use %TextIn meta-sql for the bind variable that is used for inserting into a long field. For e.g. %TextIn(:1)
%TextIn is documented in peoplebooks and is mandatory for all insertions/update of LongChar fields using sqlexec for all database platforms.
Here are some resolutions that discusses this issue in Metalink – Oracle support site.
E-AE Application Engine PeopleCode Step with SQLExec Receives Error; return code 8015 "Bind value is too long" [ID 889806.1]
E-PC:"Bind value is too long" Error When Using SQLExec to Insert into Long Char Field [ID 620874.1]
Resolution
Use %TextIn meta-sql for the bind variable that is used for inserting into a long field. For e.g. %TextIn(:1)
%TextIn is documented in peoplebooks and is mandatory for all insertions/update of LongChar fields using sqlexec for all database platforms.
Here are some resolutions that discusses this issue in Metalink – Oracle support site.
E-AE Application Engine PeopleCode Step with SQLExec Receives Error; return code 8015 "Bind value is too long" [ID 889806.1]
E-PC:"Bind value is too long" Error When Using SQLExec to Insert into Long Char Field [ID 620874.1]
i got above info from http://peoplesoftexperts.blogspot.in/
Monday, 3 December 2012
comments fields to outbound as xl file:
While comments fields to outbound as xl file, we will face some problems because of tabs ,new line chars and special chars so I searched in internet and I fund some logic and I added some logic to that code Below is code this will help adding commets to xl file
Function F2(&String As string) Returns string
Return Substring(&sTmpStr, 1, &nPos - 1);
/* Return string without last character */
End-If;
End-If;
End-If;
End-While;
End-If;
Return &sTmpStr;
End-Function;
While comments fields to outbound as xl file, we will face some problems because of tabs ,new line chars and special chars so I searched in internet and I fund some logic and I added some logic to that code Below is code this will help adding commets to xl file
Function F2(&String As string) Returns string
Local string &sCurrChar, &sTmpStr;
Local number &nPos, &nLen;
Local string &VALID = "~`!#$%^&*()_|\{}[]:'<>?\/"; /* Special chars can be allowed */
&sStr = &String; &sTmpStr = RTrim(LTrim(&sStr));
/* Trim blank spaces before and after string */
If IsAlphaNumeric(&sTmpStr) Or IsDigits(&sTmpStr) Then
/* Return String if already IsAlphanNumeric */
Return &sTmpStr;
Else
&sTmpStr = Substitute(&sTmpStr, "-", "_");
&nLen = Len(&sTmpStr);
/* Get Length of string */
&nPos = 1;
/* Set initial position */
While &nPos <= &nLen
/* Loop through string one character at a time and strip out non alpha character. */
&sCurrChar = Substring(&sTmpStr, &nPos, 1);
/* Get one character from string at the current position */
If IsAlphaNumeric(&sCurrChar) Then
/* Check if alpha character or space */
&nPos = &nPos + 1; /* Increment current position */
Else &V = Find(&sCurrChar, &VALID);
/* Leave spaces and some Special chars inside of string */
If &sCurrChar = " " Or &V > 0 Then
&nPos = &nPos + 1;
/* Increment current position */
Else
If &nPos < &nLen Then
&sTmpStr = Substring(&sTmpStr, 1, &nPos - 1) | Substring(&sTmpStr, &nPos + 1, &nLen - &nPos);
/* Remove non-alpha character */
&nLen = Len(&sTmpStr);
/* Get new length of string */
Else /* Last character */ Return Substring(&sTmpStr, 1, &nPos - 1);
/* Return string without last character */
End-If;
End-If;
End-If;
End-While;
End-If;
Return &sTmpStr;
End-Function;
Subscribe to:
Posts (Atom)