Mungkin bisa membantu...... Procedure ABC is cursor DEF is Select xxx from YYY; > > Begin open cursor DEF Loop .... End loop; END;
On 1/1/05, Anang Rahmadyan <[EMAIL PROTECTED]> wrote: > > Mungkin procedure ini bisa membantu > > Declare > C INTEGER; > Nilai Varchar2(30); > Display Varchar2(512); > Fback INTEGER; > Qry Varchar2(1024) := 'Select Nilai,Display from mytable where ......' > > BEGIN > Clear_list(ListName); > > C := DBMS_SQL.OPEN_CURSOR; > Dbms_Sql.Parse(c,Qry,1); > Fback := Dbms_sql.Execute(c); > DBMS_SQL.DEFINE_COLUMN (C,1,Nilai,30); > DBMS_SQL.DEFINE_COLUMN (C,2,Display,512); > > Loop > Exit When dbms_sql.fetch_rows(c) = 0; > DBMS_SQL.COLUMN_VALUE (c, 1, Nilai); > DBMS_SQL.COLUMN_VALUE (c, 2, Display); > Add_List_Element(ListName,1,Display,Nilai); > End Loop; > Dbms_sql.Close_Cursor(c); > END; > > Ganti querynya, semakin banyak field yang dipilih maka > DBMS_SQL.DEFINE_COLUMN (C,n,Nilai,30); juga semakin banyak. > Catatan : n = urutan field dalam variable QRY. > ----- Original Message ----- > From: agus sulaiman > To: [email protected] > Sent: 23 February 2006 18:49 > Subject: [indo-oracle] Cursor Secara Fleksibel Pada Oracle Dev 6.0 > > > Kepada Teman-teman semuanya, > Terima kasih atas masukkanya. Saya sudah cek dengan form_dll > memang bisa. > Tapi kalo untuk dicursor bagaimana caranya , apa bisa fungsi form_dll > kita buat dicursor ? > sepertinya tidak bisa ya. > sebagai contoh: > Declare > forms_dll ('cursor c_test is select * from '||vtable); > > Begin > > For x in c_test loop > Null; > > End loop; > End; > Error: Encountered the symbol (. > > Thanks, > Agus Sulaiman. > > > --------------------------------- > Relax. Yahoo! Mail virus scanning helps detect nasty viruses! > > [Non-text portions of this message have been removed] > > > > -- > -----------I.N.D.O - O.R.A.C.L.E--------------- > Keluar: [EMAIL PROTECTED] > Website: http://indo-oracle.lizt.org (NEW) > ----------------------------------------------- > > Bergabung dengan Indonesia Thin Client User Groups, > Terminal Server, Citrix, New Moon Caneveral, di: > http://indo-thin.vze.com > > > > SPONSORED LINKS Membership database software Database mortgage > software Pda database software > Database management software Oracle database > administration Oracle database management > > > > ------------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > a.. Visit your group "indo-oracle" on the web. > > b.. To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service. > > > > ------------------------------------------------------------------------------ > > > > > > ------------------------------------------------------------------------------ > > > =================================================== > > This Mail Scanned By Messaging Security Suite > > ================= Provided by IT Hardware ================= > > > [Non-text portions of this message have been removed] > > > > -- > -----------I.N.D.O - O.R.A.C.L.E--------------- > Keluar: [EMAIL PROTECTED] > Website: http://indo-oracle.lizt.org (NEW) > ----------------------------------------------- > > Bergabung dengan Indonesia Thin Client User Groups, > Terminal Server, Citrix, New Moon Caneveral, di: > http://indo-thin.vze.com > Yahoo! Groups Links > > > > > > > [Non-text portions of this message have been removed] -- -----------I.N.D.O - O.R.A.C.L.E--------------- Keluar: [EMAIL PROTECTED] Website: http://indo-oracle.lizt.org (NEW) ----------------------------------------------- Bergabung dengan Indonesia Thin Client User Groups, Terminal Server, Citrix, New Moon Caneveral, di: http://indo-thin.vze.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/indo-oracle/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

