The last written PL / SQL program is still just graduated, and it is also used by Oracle 7 for novell. It is only occasionally used for Oralce, and some syntax of PL / SQL has been all forgotten. This is not, encountering some low-level issues, Keep in mind, I hope I will not forget it.
1. When there is a CURSOR for the for Update type, add for update because it is necessary to modify and delete these data after you need to turn on Cursor, but after changing and deleting data, you will appear below. Error: ORA-01002: Read violations Ora-06512: "JWGL.PCKGSTUDSLTCOURSE", LINE 62RA-06512: In line 2
Error: ORA-06550: 2nd line, 06550: 2nd line, 05: PLS-00103: Symbol "end-of-file" in need Next: Begin Case Declarexit for goto if loop mod null pragma raise return selectupdate while with "an" Identifier "A double-quoted Delimited-Identifier" "A Bind Variable" Close Current Delete Fetch Lock Insert Open RollbacksavePoint Set SQL Execute Commit Fort Merge "a Single-Quoted SQL STRING" PIPE
I thought it was because I nested the SELECT clause, and I couldn't add for Update. Later, I found that I immediately fetch data from Cursor immediately after I changed the data immediately. In fact, when opening CURSOR with for Update, the system will give the extracl (Exclusive), so that other users before this lock release cannot make UPDATE, DELETE, and lockup. And once I execute a commit, the lock is released, the cursor has become invalid, and when Fetch data is going to fetch, there is a mistake. Therefore, it is necessary to put the commit to the loop. Wait until all data processing is complete, then COMMIT, then close the Cursor.
2. How to assign the properties of the object in an object type method In normal case, when calling an object's method, the object you self is passed in the parameter of the in type, so the properties of the object cannot be modified. Otherwise, the following error will appear.
Error: PLS-00363: Expression 'Self' cannot be used as assignment target line: 26Text: setNDNO (vsltcoursecalendar.getroundNo ());
Error: PL / SQL: Statement ignoredLine: 26Text: setRoundNO (vSltCourseCalendar.getRoundNO ()); Trying to compile an object in Oracle 9i.Why is this throwing an exception Does anyone have a clue Or all of you as puzzled as me?? ? Any excerts?
Throws Error: PLS-00363: Expression 'Self.attrib_Number' Cannot Be Used As an Assignment Target
However, you can pass the Self in the in OUT, and then assign the object attribute in the method. MEMBER FUNCTION TEST_FUNCTION (Self In Out Test_Object) Return Number