Button next_record doesn't work [message #515389] |
Mon, 11 July 2011 05:46 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/cc330fe2be8a4bdebfbf74cd77110257?s=64&d=mm&r=g) |
nessedik
Messages: 10 Registered: July 2011
|
Junior Member |
|
|
Hi,
I'm a beginner in oracle forms 6i , i have a problem with the bouton next and previous record with oracle forms 6i , i have un application developped mith a menu ( it does'nt use the default menu of orcale forms 6i) but the bouton next_record and previous_record doesn't work it displays this message : "Vous devez saisir ou supprimer un enregistrement au préalable" whatever there is a data in the database table.
I check the code behind the next record bouton , it seems to be correct : do_key('Next_record');
What can be the problem
pleaaaaaaaaaaaaase help me
I'm blocked in this proble for more than week
Thanks a lot for any help
[EDITED by LF: fixed topic title typo; was "Bouton"]
[Updated on: Wed, 13 July 2011 05:22] by Moderator Report message to a moderator
|
|
|
|
|
Re: Bouton next_record doesn't work [message #515407 is a reply to message #515405] |
Mon, 11 July 2011 07:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Block = Datablock - found in the object navigator under "Data Block".
If there is no data in the form then what exactly do you expect next_record to do?
Does the message you get have an accompanying FRM number?
|
|
|
Re: Bouton next_record doesn't work [message #515409 is a reply to message #515405] |
Mon, 11 July 2011 07:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
There's a table in your database. It contains some records (two, as you say). If you want to see how they look like, you should use a tool that allows you to do that. Oracle database's built-in tool is SQL*Plus, so - if you runselect * from your_table; in SQL*Plus, you'll get those records displayed on the screen.
You chose to use Forms, a tool that allows you to create user-friendly GUI ("a form") so that your users wouldn't have to use SQL*Plus. In order to do that, you have to get that table into a form. A block contains columns (which are, in Forms, called "items") that represent your table. The simplest way is to do that by following the Wizard's instructions; take a table, select all its columns, display it in a tabular mode.
When you compile and run a form, it is empty (although it is based on your table). If you want to display those records, you have to (virtually) perform In Forms, you do that by "executing a query". Now that you have records displayed on the screen, each of them in its own block record, you can scroll up ("previous record") and down ("next record"). There's no use to scroll through an empty block, don't you agree?
Forms built-in toolbar contains useful buttons (including next and previous record ones). You chose not to use it, but to develop your own one. That's OK, as long as you know what you are doing.
Unfortunately, you are brand new to Forms and - as it seems - didn't read any documentation (at least, the basics) or attend training lessons. I'm afraid that you won't be able to work with Forms with knowledge you have at the moment. Try to find a tutorial, read Forms Online Help, ask someone who worked with Forms to show you at least something so that you'd be able to explain what's bothering you. You don't even know the terminology ... gosh, you and we will have a long, hot Summer.
|
|
|
|
|
Re: Bouton next_record doesn't work [message #515559 is a reply to message #515549] |
Tue, 12 July 2011 03:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
nessedik wrote on Tue, 12 July 2011 09:28
Quote:
Block = Datablock - found in the object navigator under "Data Block".
Unfortunately, in the file maint.mmb for the menu does'nt contain a datablock in the object navigator
The menu doesn't, but then the menu doesn't have records either. It's attached to a form. Next_record acts on the form.
nessedik wrote on Tue, 12 July 2011 09:28
when I click on the bouton next record I have this message with the frm number: "FRM-40102 : Vous devez saisir ou supprimer un enregistrement au préalable"
Form Builder help is a wonderful thing, you can look up error messages in it:
Form Builder help topic
FRM-40102: Record must be entered or deleted first.
Cause: You pressed [Next Record] or [Down] in a context where it is meaningless.
Either:
1. The last record in a block is the current record.
2. The block is empty.
3. You are in a new record in the middle of the block created by pressing [Insert Record].
Action: No action is necessary.
I suggest you spend a while reading the docs LF linked to.
|
|
|
|
|
|
|
|
Re: Bouton next_record doesn't work [message #515617 is a reply to message #515612] |
Tue, 12 July 2011 07:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Again - what exactly are you expecting next_record to do?
The error description from help above is quite clear. So I assume you are trying to do something that next_record can't do.
Is there data visible in the screen when you press the button?
|
|
|
|
|
Re: Bouton next_record doesn't work [message #515748 is a reply to message #515743] |
Wed, 13 July 2011 03:10 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Next_record does not do what you think it does. To get records from a database table into a database block in the form you need to use execute_query.
You really need to spend some time reading the docs, you have no understanding of how the basics of forms work.
|
|
|
|
|
Re: Bouton next_record doesn't work [message #515809 is a reply to message #515793] |
Wed, 13 July 2011 06:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/cc330fe2be8a4bdebfbf74cd77110257?s=64&d=mm&r=g) |
nessedik
Messages: 10 Registered: July 2011
|
Junior Member |
|
|
thanks cookiemonster
Yes I have make some google search but I didn't find a good tutorial
Yes I have seen the youtube vedeo demo it seems to be interesent
If any one knows good tutorials will greatly welcome
Thanks a lot
best regards
A+++
|
|
|