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.

TDbfDataSet problem

Foro público de Xailer en español
Responder
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

TDbfDataSet problem

Mensaje por Ingo »

Ignacio,
can you help?
I hold some dbfs open during the runtime and like to open one of them again
in a new workarea for browseing the indexed data with TDBBrowse and
TDbfDataSet.
The problem is, that in this case Ctrl+PgDn TDBBrowse doesn't show the last
record in the index.
Please take a look to the sample.
Click on the "GesList"-button to open the dialogbox with the TDBBrowse.
Push Ctrl+PgDn - the oDataSet:KeyNo shows 676, the last record in the
indexfile.
But the last row of the TDBBrowse shows the data from KeyNo 530 and not from
676.
What is wrong with my code?
Regards
Ingo


Attached files Test.zip (11.6 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9463
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TDbfDataSet problem

Mensaje por ignacio »

Ingo,
After 1 hour searching I found the bug. Is a xHarbour bug. Just change the
following code on your sample:
METHOD FormInitialize( oSender ) CLASS GesList
With Object ::oData
:Open()
:lReUseDel:=.F.
:GoBottom()
logdebug( :Recno() )
:Skip()
logdebug( :Recno() )
End with
RETURN Nil
First LogDebug() shows record number 229. After the SKIP the record number
should be the same since is the end of file, but you will see that it jumps
to record 676.
I know there are a lot changes on xHarbour CVS right now, and that is the
reason why they can not publish the first RC. I suggest to wait until that
RC is released.
Regards,
"Ingo" <ingo.jh@web.de> escribió en el mensaje
news:[email=436cc245@ozsrvnegro.ozlan.local...]436cc245@ozsrvnegro.ozlan.local...[/email]
> Ignacio,
>
> can you help?
>
> I hold some dbfs open during the runtime and like to open one of them
> again in a new workarea for browseing the indexed data with TDBBrowse and
> TDbfDataSet.
> The problem is, that in this case Ctrl+PgDn TDBBrowse doesn't show the
> last record in the index.
>
> Please take a look to the sample.
>
> Click on the "GesList"-button to open the dialogbox with the TDBBrowse.
> Push Ctrl+PgDn - the oDataSet:KeyNo shows 676, the last record in the
> indexfile.
> But the last row of the TDBBrowse shows the data from KeyNo 530 and not
> from 676.
>
> What is wrong with my code?
>
> Regards
>
> Ingo
>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9463
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TDbfDataSet problem

Mensaje por ignacio »

Ingo,
José Giménez did some research and found the real problem, you are using the
ALIAS in the index expression. Since you open the table twice the second
table is openened with a diferent ALIAS, but its index points to the first
table openened. Quite complicated.
Just change the index expression to:
FIELD GESETZ
INDEX ON UPPER(GESETZ) TAG WDGES TO wdges
Regards,
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> escribió en el mensaje
news:436f284d$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Ingo,
>
> After 1 hour searching I found the bug. Is a xHarbour bug. Just change the
> following code on your sample:
>
> METHOD FormInitialize( oSender ) CLASS GesList
>
> With Object ::oData
> :Open()
> :lReUseDel:=.F.
> :GoBottom()
> logdebug( :Recno() )
> :Skip()
> logdebug( :Recno() )
> End with
>
> RETURN Nil
>
> First LogDebug() shows record number 229. After the SKIP the record number
> should be the same since is the end of file, but you will see that it
> jumps to record 676.
>
> I know there are a lot changes on xHarbour CVS right now, and that is the
> reason why they can not publish the first RC. I suggest to wait until that
> RC is released.
>
> Regards,
>
>
>
>
> "Ingo" <ingo.jh@web.de> escribió en el mensaje
> news:[email=436cc245@ozsrvnegro.ozlan.local...]436cc245@ozsrvnegro.ozlan.local...[/email]
>> Ignacio,
>>
>> can you help?
>>
>> I hold some dbfs open during the runtime and like to open one of them
>> again in a new workarea for browseing the indexed data with TDBBrowse and
>> TDbfDataSet.
>> The problem is, that in this case Ctrl+PgDn TDBBrowse doesn't show the
>> last record in the index.
>>
>> Please take a look to the sample.
>>
>> Click on the "GesList"-button to open the dialogbox with the TDBBrowse.
>> Push Ctrl+PgDn - the oDataSet:KeyNo shows 676, the last record in the
>> indexfile.
>> But the last row of the TDBBrowse shows the data from KeyNo 530 and not
>> from 676.
>>
>> What is wrong with my code?
>>
>> Regards
>>
>> Ingo
>>
>>
>>
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Ingo
Mensajes: 330
Registrado: Mié Jul 05, 2006 3:58 pm

TDbfDataSet problem

Mensaje por Ingo »

Oops that's it. Sorry for the molestation! :-(
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> schrieb im Newsbeitrag
news:436f3bf5$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Ingo,
>
> José Giménez did some research and found the real problem, you are using
> the ALIAS in the index expression. Since you open the table twice the
> second table is openened with a diferent ALIAS, but its index points to
> the first table openened. Quite complicated.
>
> Just change the index expression to:
>
> FIELD GESETZ
> INDEX ON UPPER(GESETZ) TAG WDGES TO wdges
>
> Regards,
>
> "Ignacio Ortiz de Zúñiga" <InvalidAccount@ozs.com> escribió en el mensaje
> news:436f284d$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
>> Ingo,
>>
>> After 1 hour searching I found the bug. Is a xHarbour bug. Just change
>> the following code on your sample:
>>
>> METHOD FormInitialize( oSender ) CLASS GesList
>>
>> With Object ::oData
>> :Open()
>> :lReUseDel:=.F.
>> :GoBottom()
>> logdebug( :Recno() )
>> :Skip()
>> logdebug( :Recno() )
>> End with
>>
>> RETURN Nil
>>
>> First LogDebug() shows record number 229. After the SKIP the record
>> number should be the same since is the end of file, but you will see that
>> it jumps to record 676.
>>
>> I know there are a lot changes on xHarbour CVS right now, and that is the
>> reason why they can not publish the first RC. I suggest to wait until
>> that RC is released.
>>
>> Regards,
>>
>>
>>
>>
>> "Ingo" <ingo.jh@web.de> escribió en el mensaje
>> news:[email=436cc245@ozsrvnegro.ozlan.local...]436cc245@ozsrvnegro.ozlan.local...[/email]
>>> Ignacio,
>>>
>>> can you help?
>>>
>>> I hold some dbfs open during the runtime and like to open one of them
>>> again in a new workarea for browseing the indexed data with TDBBrowse
>>> and TDbfDataSet.
>>> The problem is, that in this case Ctrl+PgDn TDBBrowse doesn't show the
>>> last record in the index.
>>>
>>> Please take a look to the sample.
>>>
>>> Click on the "GesList"-button to open the dialogbox with the TDBBrowse.
>>> Push Ctrl+PgDn - the oDataSet:KeyNo shows 676, the last record in the
>>> indexfile.
>>> But the last row of the TDBBrowse shows the data from KeyNo 530 and not
>>> from 676.
>>>
>>> What is wrong with my code?
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>>
>>>
>>
>>
>
>
Responder