Cursor and updating same records inside cursor a school based program to prevent adolescent dating violence
It’s rare, in fact, that the data with which you are working is just a single value, so records and other composite datatypes are likely to figure prominently in your PL/SQL programs.
This article explores how you declare records, populate them with rows from a table, and even insert or change an entire row in a table by using a record.
A REF CURSOR must only be returned under a specific condition (i.e. Execute(); If I know something is going to be returned? And how do I check at the ASP level whether the ref cursor will have been opened or not? Now, in your ASP code where you intend to use that ref cursor, you need to have an IF statement: if xxx then (use the ref cursor) end if Now, since your ASP program called the PL/SQL procedure in the first place, presumably it knows what value it passed for param2?
If so then the IF logic is if value_passed_as_param2 = 4 then (use the ref cursor) end if If somehow (I can't imagine how!
Cursors allow you to fetch a set of data, loop through each record, and modify the values as necessary; then, you can easily assign these values to variables and perform processing on these values.
Depending on the type of cursor you request, you can even fetch records that you've previously fetched.
Instead, a typical Access database is a a collection of tables, plus a set of objects built around those tables — forms, reports, queries, and so on.
In addition, those objects must adhere to a set of design principles or the database will either work poorly or fail altogether.
param X OUT NUMBER Then in the PL/SQL procedure you would say: IF param1 = 2 param X := 0; /* do something */ ELSE IF param2 = 4 /* Open REF CURSOR for return parameter */ OPEN curs FOR SELECT * FROM temp; param X := 1; END IF; And in the ASP: if Param X = 1 then (use the ref cursor) end if Thanks Tony, First of all I very much appreciate the help you're giving me.The trouble starts when param1 is 2 and therefore no REF CURSOR is returned.