Home » Developer & Programmer » Forms » cursor issue
cursor issue [message #145742] Sat, 05 November 2005 11:33 Go to next message
maoro
Messages: 312
Registered: May 2005
Senior Member
hello
i created a cursor that select data from a table based on date borders
entered by the user
i want to be able to display the records returned one by one
for editing in the other text item in the form
i tried a temporary table
but it didnt work
ill attach the form
thanks for your help
  • Attachment: SALES_AD.fmb
    (Size: 88.00KB, Downloaded 1094 times)
Re: cursor issue [message #145814 is a reply to message #145742] Sun, 06 November 2005 23:39 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What version of Forms is this? Are your items defined as 'Sound' eg 'BL_SALES_AD.TI_SALE_DATE_BEG' is showing as having an Item Type of Sound?

David
Re: cursor issue [message #145850 is a reply to message #145742] Mon, 07 November 2005 04:12 Go to previous messageGo to next message
maoro
Messages: 312
Registered: May 2005
Senior Member
thanks david for your reply
you always help
well there is no sound in that form im sure its my mistake
the problem is in this form i wanna get sales records between 2 dates entered by the user ,
it works fine but the cursoe gives me all the records ,
i want to be able to load the records one by one into text iten firlds in the form and use a push button to navigate to the next records ,
so i can pick the record that i want to edit
i used a cursor maybe its wrong decision
thanks for your help
its forms9i on xp using DS no application server
thanks again
Re: cursor issue [message #145954 is a reply to message #145850] Mon, 07 November 2005 19:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
@others:
Is anyone else having a problem opening this form?
Are the item types correct in your Forms Builder?

David
Re: cursor issue [message #145998 is a reply to message #145742] Tue, 08 November 2005 02:21 Go to previous messageGo to next message
maoro
Messages: 312
Registered: May 2005
Senior Member
all items are fine
i just need a way to get the records loaded into forms items one by one ,so i can be able to edit those records
those records are filtered by date
thx
Re: cursor issue [message #146136 is a reply to message #145998] Tue, 08 November 2005 20:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I'm sorry ... when I open this form I am getting 'PDE-PEP006 Encoded Program unit has an unknown format'.

From what I can see your block is not based on a table. My suggestion is always to use the wizards to create your block and then your layout. Try that and see how you go.

David
Re: cursor issue [message #146386 is a reply to message #145742] Thu, 10 November 2005 02:36 Go to previous messageGo to next message
maoro
Messages: 312
Registered: May 2005
Senior Member
thx david
the issue was solved simply using first_record and last_record from the cursor
sorry iam a newbie and you thought something more serious is what i need
thanks for your continuious help
Re: cursor issue [message #146525 is a reply to message #146386] Thu, 10 November 2005 22:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I really DON'T like these cursors, why can't you base the block on a table?

David
Re: cursor issue [message #146570 is a reply to message #146525] Fri, 11 November 2005 02:16 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
djmartin wrote on Fri, 11 November 2005 05:15

I really DON'T like these cursors

Sad I love cursors, that's how Oracle queries anything. Even a simple select in SQL*Plus uses a cursor. Just pulling your leg, David Wink

But in general, I agree: base blocks on tables, don't use cursors and next_record solutions just like that. It's error prone, it's hard to maintain, it's bound to perform less, it makes your Form heavier, ....

MHE
Re: cursor issue [message #147192 is a reply to message #145742] Wed, 16 November 2005 04:24 Go to previous messageGo to next message
maoro
Messages: 312
Registered: May 2005
Senior Member
hi again
well i dont know how to use directly the base table , cause there is a query on the table ,
i dont want to get all the records , so where the result of the query is supposed to be stored if no cursor is used ...temporary table ?

thanks
Re: cursor issue [message #147203 is a reply to message #147192] Wed, 16 November 2005 05:22 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
How about using a DEFAULT_WHERE?

MHE
Previous Topic: POPULATE LIST ITEMS FROM LIST ITEM VALUE
Next Topic: how to display master block with detail tab page together
Goto Forum:
  


Current Time: Fri Sep 20 03:57:35 CDT 2024