In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
problem in TDBFBrowse
problem in TDBFBrowse
Dear developers!
I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
I try to deal with empty table that has only deleted records.
When I browse this table, first row is always appeared.
When I do oBrowse:Append(), the new record is appended to the second row.
When I do oBrowse:Edit(), the first phantom row is edited.
When I double click on any column of first row, it is edited.
See attached sample.
Is there any way to fix it?
Regards, Oleg
I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
I try to deal with empty table that has only deleted records.
When I browse this table, first row is always appeared.
When I do oBrowse:Append(), the new record is appended to the second row.
When I do oBrowse:Edit(), the first phantom row is edited.
When I double click on any column of first row, it is edited.
See attached sample.
Is there any way to fix it?
Regards, Oleg
problem in TDBFBrowse
Sorry, I forget to attach my sample.
Attached files test75.zip (2.5 KB)Â
Attached files test75.zip (2.5 KB)Â
problem in TDBFBrowse
Sorry, I forget to attach my sample.
Attached files test75.zip (2.5 KB)Â
Attached files test75.zip (2.5 KB)Â
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
problem in TDBFBrowse
Oleg,
> When I browse this table, first row is always appeared.
As you surely know, the fact that SET DELETED ON is set does not mean you
can not go to a specific deleted record. In fact, when you open a table the
record pointer is positioned on first record, even if is deleted. It is a
good practice to perform a GOTOP after openning the table. Please check if
this is your problem.
I supposse the rest of the errors are part of the first error.
Regards,
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:489185f6$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
> I try to deal with empty table that has only deleted records.
>
> When I browse this table, first row is always appeared.
> When I do oBrowse:Append(), the new record is appended to the second row.
> When I do oBrowse:Edit(), the first phantom row is edited.
> When I double click on any column of first row, it is edited.
>
> See attached sample.
>
> Is there any way to fix it?
>
> Regards, Oleg
>
> When I browse this table, first row is always appeared.
As you surely know, the fact that SET DELETED ON is set does not mean you
can not go to a specific deleted record. In fact, when you open a table the
record pointer is positioned on first record, even if is deleted. It is a
good practice to perform a GOTOP after openning the table. Please check if
this is your problem.
I supposse the rest of the errors are part of the first error.
Regards,
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:489185f6$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
> I try to deal with empty table that has only deleted records.
>
> When I browse this table, first row is always appeared.
> When I do oBrowse:Append(), the new record is appended to the second row.
> When I do oBrowse:Edit(), the first phantom row is edited.
> When I double click on any column of first row, it is edited.
>
> See attached sample.
>
> Is there any way to fix it?
>
> Regards, Oleg
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
problem in TDBFBrowse
Oleg,
> When I browse this table, first row is always appeared.
As you surely know, the fact that SET DELETED ON is set does not mean you
can not go to a specific deleted record. In fact, when you open a table the
record pointer is positioned on first record, even if is deleted. It is a
good practice to perform a GOTOP after openning the table. Please check if
this is your problem.
I supposse the rest of the errors are part of the first error.
Regards,
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:489185f6$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
> I try to deal with empty table that has only deleted records.
>
> When I browse this table, first row is always appeared.
> When I do oBrowse:Append(), the new record is appended to the second row.
> When I do oBrowse:Edit(), the first phantom row is edited.
> When I double click on any column of first row, it is edited.
>
> See attached sample.
>
> Is there any way to fix it?
>
> Regards, Oleg
>
> When I browse this table, first row is always appeared.
As you surely know, the fact that SET DELETED ON is set does not mean you
can not go to a specific deleted record. In fact, when you open a table the
record pointer is positioned on first record, even if is deleted. It is a
good practice to perform a GOTOP after openning the table. Please check if
this is your problem.
I supposse the rest of the errors are part of the first error.
Regards,
--
Ignacio Ortiz de Zúñiga
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:489185f6$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> I have a problem with TDBFBrowse. I use SET DELETED ON in all my programs.
> I try to deal with empty table that has only deleted records.
>
> When I browse this table, first row is always appeared.
> When I do oBrowse:Append(), the new record is appended to the second row.
> When I do oBrowse:Edit(), the first phantom row is edited.
> When I double click on any column of first row, it is edited.
>
> See attached sample.
>
> Is there any way to fix it?
>
> Regards, Oleg
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
problem in TDBFBrowse
Ignacio!
> As you surely know, the fact that SET DELETED ON is set does not mean you
> can not go to a specific deleted record. In fact, when you open a table
> the record pointer is positioned on first record, even if is deleted. It
> is a good practice to perform a GOTOP after openning the table. Please
> check if this is your problem.
>
> I supposse the rest of the errors are part of the first error.
>
My problem still exists (with or without GOTOP after opening).
Please, can you look at my sample and see this problem?
Regards, Oleg
> As you surely know, the fact that SET DELETED ON is set does not mean you
> can not go to a specific deleted record. In fact, when you open a table
> the record pointer is positioned on first record, even if is deleted. It
> is a good practice to perform a GOTOP after openning the table. Please
> check if this is your problem.
>
> I supposse the rest of the errors are part of the first error.
>
My problem still exists (with or without GOTOP after opening).
Please, can you look at my sample and see this problem?
Regards, Oleg
problem in TDBFBrowse
Ignacio!
> As you surely know, the fact that SET DELETED ON is set does not mean you
> can not go to a specific deleted record. In fact, when you open a table
> the record pointer is positioned on first record, even if is deleted. It
> is a good practice to perform a GOTOP after openning the table. Please
> check if this is your problem.
>
> I supposse the rest of the errors are part of the first error.
>
My problem still exists (with or without GOTOP after opening).
Please, can you look at my sample and see this problem?
Regards, Oleg
> As you surely know, the fact that SET DELETED ON is set does not mean you
> can not go to a specific deleted record. In fact, when you open a table
> the record pointer is positioned on first record, even if is deleted. It
> is a good practice to perform a GOTOP after openning the table. Please
> check if this is your problem.
>
> I supposse the rest of the errors are part of the first error.
>
My problem still exists (with or without GOTOP after opening).
Please, can you look at my sample and see this problem?
Regards, Oleg
- ignacio
- Site Admin
- Mensajes: 9469
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
problem in TDBFBrowse
Oleg,
I saw the problem, but does not have an easy fix on our part. Let me
explain:
The browse needs to know how many records are visible. For speed reasons the
record counting is done with the classic ORDKEYCOUNT() function. But this
function includes deleted records, but can easily be fixed including the
expression !DELETED() on the FOR clause of the index.
Another chance is to overload the event TDbfBrowse:OnKeyCount(). For
example:
::oDbfBrowse1:OnKeyCount := {|| MyCount( ) }
FUNCTION MyCount()
LOCAL nCount, nRecno
nCount := 0
nRecno := ::Recno()
DbGoTop()
DbEval( {|| nCount ++ } )
DbGoTo( nRecno )
RETURN nCount
BTW, this can be very slow with large databases
Another chance is to use Datacontrols: a TDbfDataset and and TDBBrowse. And
on the dataset set the property lKeyExact to .T. which indeed performs the
same operation as described in second solution.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:4892dbcd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
>> As you surely know, the fact that SET DELETED ON is set does not mean you
>> can not go to a specific deleted record. In fact, when you open a table
>> the record pointer is positioned on first record, even if is deleted. It
>> is a good practice to perform a GOTOP after openning the table. Please
>> check if this is your problem.
>>
>> I supposse the rest of the errors are part of the first error.
>>
>
> My problem still exists (with or without GOTOP after opening).
> Please, can you look at my sample and see this problem?
>
> Regards, Oleg
>
I saw the problem, but does not have an easy fix on our part. Let me
explain:
The browse needs to know how many records are visible. For speed reasons the
record counting is done with the classic ORDKEYCOUNT() function. But this
function includes deleted records, but can easily be fixed including the
expression !DELETED() on the FOR clause of the index.
Another chance is to overload the event TDbfBrowse:OnKeyCount(). For
example:
::oDbfBrowse1:OnKeyCount := {|| MyCount( ) }
FUNCTION MyCount()
LOCAL nCount, nRecno
nCount := 0
nRecno := ::Recno()
DbGoTop()
DbEval( {|| nCount ++ } )
DbGoTo( nRecno )
RETURN nCount
BTW, this can be very slow with large databases
Another chance is to use Datacontrols: a TDbfDataset and and TDBBrowse. And
on the dataset set the property lKeyExact to .T. which indeed performs the
same operation as described in second solution.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:4892dbcd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
>> As you surely know, the fact that SET DELETED ON is set does not mean you
>> can not go to a specific deleted record. In fact, when you open a table
>> the record pointer is positioned on first record, even if is deleted. It
>> is a good practice to perform a GOTOP after openning the table. Please
>> check if this is your problem.
>>
>> I supposse the rest of the errors are part of the first error.
>>
>
> My problem still exists (with or without GOTOP after opening).
> Please, can you look at my sample and see this problem?
>
> Regards, Oleg
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
problem in TDBFBrowse
Oleg,
I saw the problem, but does not have an easy fix on our part. Let me
explain:
The browse needs to know how many records are visible. For speed reasons the
record counting is done with the classic ORDKEYCOUNT() function. But this
function includes deleted records, but can easily be fixed including the
expression !DELETED() on the FOR clause of the index.
Another chance is to overload the event TDbfBrowse:OnKeyCount(). For
example:
::oDbfBrowse1:OnKeyCount := {|| MyCount( ) }
FUNCTION MyCount()
LOCAL nCount, nRecno
nCount := 0
nRecno := ::Recno()
DbGoTop()
DbEval( {|| nCount ++ } )
DbGoTo( nRecno )
RETURN nCount
BTW, this can be very slow with large databases
Another chance is to use Datacontrols: a TDbfDataset and and TDBBrowse. And
on the dataset set the property lKeyExact to .T. which indeed performs the
same operation as described in second solution.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:4892dbcd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
>> As you surely know, the fact that SET DELETED ON is set does not mean you
>> can not go to a specific deleted record. In fact, when you open a table
>> the record pointer is positioned on first record, even if is deleted. It
>> is a good practice to perform a GOTOP after openning the table. Please
>> check if this is your problem.
>>
>> I supposse the rest of the errors are part of the first error.
>>
>
> My problem still exists (with or without GOTOP after opening).
> Please, can you look at my sample and see this problem?
>
> Regards, Oleg
>
I saw the problem, but does not have an easy fix on our part. Let me
explain:
The browse needs to know how many records are visible. For speed reasons the
record counting is done with the classic ORDKEYCOUNT() function. But this
function includes deleted records, but can easily be fixed including the
expression !DELETED() on the FOR clause of the index.
Another chance is to overload the event TDbfBrowse:OnKeyCount(). For
example:
::oDbfBrowse1:OnKeyCount := {|| MyCount( ) }
FUNCTION MyCount()
LOCAL nCount, nRecno
nCount := 0
nRecno := ::Recno()
DbGoTop()
DbEval( {|| nCount ++ } )
DbGoTo( nRecno )
RETURN nCount
BTW, this can be very slow with large databases
Another chance is to use Datacontrols: a TDbfDataset and and TDBBrowse. And
on the dataset set the property lKeyExact to .T. which indeed performs the
same operation as described in second solution.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:4892dbcd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
>> As you surely know, the fact that SET DELETED ON is set does not mean you
>> can not go to a specific deleted record. In fact, when you open a table
>> the record pointer is positioned on first record, even if is deleted. It
>> is a good practice to perform a GOTOP after openning the table. Please
>> check if this is your problem.
>>
>> I supposse the rest of the errors are part of the first error.
>>
>
> My problem still exists (with or without GOTOP after opening).
> Please, can you look at my sample and see this problem?
>
> Regards, Oleg
>
problem in TDBFBrowse
Ignacio,
> I saw the problem, but does not have an easy fix on our part. Let me
> explain:
>
> The browse needs to know how many records are visible. For speed reasons
> the record counting is done with the classic ORDKEYCOUNT() function. But
> this function includes deleted records, but can easily be fixed including
> the expression !DELETED() on the FOR clause of the index.
>
Thank you for the explanation. I will try to work around it by one of these
ways.
Regards, Oleg
> I saw the problem, but does not have an easy fix on our part. Let me
> explain:
>
> The browse needs to know how many records are visible. For speed reasons
> the record counting is done with the classic ORDKEYCOUNT() function. But
> this function includes deleted records, but can easily be fixed including
> the expression !DELETED() on the FOR clause of the index.
>
Thank you for the explanation. I will try to work around it by one of these
ways.
Regards, Oleg
problem in TDBFBrowse
Ignacio,
> I saw the problem, but does not have an easy fix on our part. Let me
> explain:
>
> The browse needs to know how many records are visible. For speed reasons
> the record counting is done with the classic ORDKEYCOUNT() function. But
> this function includes deleted records, but can easily be fixed including
> the expression !DELETED() on the FOR clause of the index.
>
Thank you for the explanation. I will try to work around it by one of these
ways.
Regards, Oleg
> I saw the problem, but does not have an easy fix on our part. Let me
> explain:
>
> The browse needs to know how many records are visible. For speed reasons
> the record counting is done with the classic ORDKEYCOUNT() function. But
> this function includes deleted records, but can easily be fixed including
> the expression !DELETED() on the FOR clause of the index.
>
Thank you for the explanation. I will try to work around it by one of these
ways.
Regards, Oleg