James Bott wrote:Rimintas,
That is one of the problems I was trying to explain. You can add a blank record to a TDatabase object but you cannot display it in the browse. Then blank is just an empty aBuffer so you cannot see it by doing a goBottom() because there is no blank record. Going to the bottom will load that last record into aBuffer for display which is not what you want.
So whether you use a database object or not you will have to add a new blank record to get a blank record to display in the browse. Then if the user decides not to save the new record you will have to delete it.
As I mentioned before this is one reason it is so much easier to use a dialog for record editing. With a database object you can edit a blank buffer and thus only if the user wants to save the record is a new record added to the database.
James
James , my name is Rimantas ...
Maybe you are right ...
But I hope that this can be solved ... In mine opinion , dialogs for inputs of new records isn't a good way . In mine main workplace I'm working with Microsoft Bussines Solution - Axapta , so I can compare some technologies . Of course , the database here is Oracle and here programmatically is done that grid can show a new blank record , because any SQL can do that . You can refuse from the new record without any risk , until "ttsbegin" and "ttscommit" transactions aren't running or save new record in database . Of course SQL technologies differs from DBF's , sorry . But I'm not believing that xBrowse can't to solve a such small problem ...
. I hope that Antonio will answer or will give some good ideas how to do that ...
. So why use Blank() in TDatabase if you can't add this in browse ? Only for input dialogs ?
Regards !
Rimantas U.