Hola Rolando,
Quizas me explique mal o insuficientemente, yo quería decir lo que te
dice Ignacio.
Saludos. Miguel A. Torrellas
Rolando Sarrailh escribió:
> Hola:
> Yo creo que lo que quiere Miguel es que el ProgressBar funcione
> mientras el servidor le está enviando los datos de su tablita de 100.000
> registros, es decir de alguna manera incluirlo en el select.
> Saludos.
>
> "Ignacio Ortiz de Zúñiga" <
NoName@xailer.com> escribió en el mensaje
> news:46012507$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
>> Rolando,
>>
>> oDataset := oDataSource:Query( "SELECT * FROM TABLA" )
>> oDataset:lOpen := .t.
>> DO WHILE !oDataset:Eof()
>> ............................
>> ............................
>> oDataSet:MoveNext()
>> oProgressBar:nValue ++
>> ENDDO
>>
>> Saludos
>>
>> --
>> Ignacio Ortiz de Zúñiga
>>
http://www.xailer.com
>>
>>
>> "Rolando Sarrailh" <
rsarrailh@gmail.com> escribió en el mensaje
>> news:[email=
460123a8@news.xailer.com...]
460123a8@news.xailer.com...[/email]
>>> Hola:
>>> José Luís e Ignacio, de que bucle y de que iteración hablan, si lo
>>> que esta haciendo Miguel es "SELECT * FROM TABLA".
>>>
>>> Saludos.
>>>
>>> "Ignacio Ortiz de Zúñiga" <
NoName@xailer.com> escribió en el mensaje
>>> news:460116f8$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
>>>> Miguel,
>>>>
>>>> oProgressBar:nValue ++ en cada iteración.
>>>>
>>>> Saludos
>>>>
>>>> --
>>>> Ignacio Ortiz de Zúñiga
>>>>
http://www.xailer.com
>>>>
>>>>
>>>> "Miguel A. Torrellas" <
miguel@torrellas.net> escribió en el mensaje
>>>> news:46011416$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
>>>>> Gracias por vuestras respuestas Ignacio y Jose Luis..
>>>>>
>>>>> Como no encuentro la forma de obtener el nº de fila, asi es como lo he
>>>>> dejado.
>>>>>
>>>>> Saludos.
>>>>>
>>>>> José Luis Capel - Aicom escribió:
>>>>>> Miguel,
>>>>>>
>>>>>> Y si primero haces un select count(*) de los registros que te vas a
>>>>>> traer y luego, en el bucle mantienes tu el contador ??
>>>>>>
>>>>>> Saludos,
>>>>>> José Luis Capel
>>>>>>
>>>>>> "Miguel A. Torrellas" <
miguel@torrellas.net> escribió en el mensaje
>>>>>> news:[email=
46010d29@news.xailer.com...]
46010d29@news.xailer.com...[/email]
>>>>>>> Gracias Jose Luis.
>>>>>>>
>>>>>>> He hecho diversas pruebas, lo que pasa es que la tabla tiene 101566
>>>>>>> filas, claro, en cursor cliente, el hecho de abrirla con acceso
>>>>>>> remoto, pues eso, sin comentarios. Con la configuración del cursor
>>>>>>> como la he puesto, los accesos son mas que aceptables, solo me
>>>>>>> faltaria saber como introducir el dato en el SELECT para poder
>>>>>>> enviarlo al TProgressbar.
>>>>>>>
>>>>>>> Saludos. Miguel A. Torrellas
>>>>>>>
>>>>>>> José Luis Capel - Aicom escribió:
>>>>>>>> Miguel,
>>>>>>>>
>>>>>>>> So pena de penalizar el rendimiento, prueba a utilizar un cursor
>>>>>>>> cliente.
>>>>>>>>
>>>>>>>> Saludos,
>>>>>>>> José Luis Capel
>>>>>>>>
>>>>>>>> "Miguel A. Torrellas" <
miguel@torrellas.net> escribió en el mensaje
>>>>>>>> news:[email=
46010b11@news.xailer.com...]
46010b11@news.xailer.com...[/email]
>>>>>>>>> Gracias Ignacio, lo sospechaba
>>>>>>>>>
>>>>>>>>> La idea era utilizar TProgressbar, estoy buscando funciones de SQL
>>>>>>>>> Server para incorporar el dato al SELECT, de momento no las
>>>>>>>>> encuentro, si me puedes ayudar quedaré agradecido.
>>>>>>>>>
>>>>>>>>> Saludos de nuevo.
>>>>>>>>>
>>>>>>>>> Ignacio Ortiz de Zúñiga escribió:
>>>>>>>>>> Miguel,
>>>>>>>>>> Seguramente generen un error ya que ese tipo de cursor no soporta
>>>>>>>>>> ni recuperación de Bookmark ni tampoco RecordCount.
>>>>>>>>>> Un saludo
>>>>>>>>>> Bookmark Property
>>>>>>>>>>
>>>>>>>>>> Indicates a bookmark that uniquely identifies the current record
>>>>>>>>>> in a Recordset
>>>>>>>>>> <ms-help://MS.PSDKSVR2003SP1.1033/ado270/htm/mdaobj01_19.htm>
>>>>>>>>>> object or sets the current record in a *Recordset* object to the
>>>>>>>>>> record identified by a valid bookmark.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Settings and Return Values
>>>>>>>>>>
>>>>>>>>>> Sets or returns a *Variant* expression that evaluates to a valid
>>>>>>>>>> bookmark.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Remarks
>>>>>>>>>>
>>>>>>>>>> Use the *Bookmark* property to save the position of the current
>>>>>>>>>> record and return to that record at any time. Bookmarks are
>>>>>>>>>> available only in *Recordset* objects that support bookmark
>>>>>>>>>> functionality.
>>>>>>>>>>
>>>>>>>>>> When you open a *Recordset* object, each of its records has a
>>>>>>>>>> unique bookmark. To save the bookmark for the current record,
>>>>>>>>>> assign the value of the *Bookmark* property to a variable. To
>>>>>>>>>> quickly return to that record at any time after moving to a
>>>>>>>>>> different record, set the *Recordset* object's *Bookmark* property
>>>>>>>>>> to the value of that variable.
>>>>>>>>>>
>>>>>>>>>> The user may not be able to view the value of the bookmark. Also,
>>>>>>>>>> users should not expect bookmarks to be directly comparable-two
>>>>>>>>>> bookmarks that refer to the same record may have different values.
>>>>>>>>>>
>>>>>>>>>> If you use the Clone
>>>>>>>>>> <ms-help://MS.PSDKSVR2003SP1.1033/ado270/htm/mdamth01_9.htm>
>>>>>>>>>> method to create a copy of a *Recordset* object, the *Bookmark*
>>>>>>>>>> property settings for the original and the duplicate *Recordset*
>>>>>>>>>> objects are identical and you can use them interchangeably.
>>>>>>>>>> However, you cannot use bookmarks from different *Recordset*
>>>>>>>>>> objects interchangeably, even if they were created from the same
>>>>>>>>>> source or command.
>>>>>>>>>>
>>>>>>>>>> *Remote Data Service Usage *When used on a client-side
>>>>>>>>>> *Recordset*
>>>>>>>>>> object, the *Bookmark* property is always available.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> RecordCount Property
>>>>>>>>>>
>>>>>>>>>> Indicates the number of records in a Recordset
>>>>>>>>>> <ms-help://MS.PSDKSVR2003SP1.1033/ado270/htm/mdaobj01_19.htm>
>>>>>>>>>> object.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Return Value
>>>>>>>>>>
>>>>>>>>>> Returns a *Long* value that indicates the number of records in the
>>>>>>>>>> *Recordset*.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Remarks
>>>>>>>>>>
>>>>>>>>>> Use the *RecordCount* property to find out how many records are in
>>>>>>>>>> a *Recordset* object. The property returns -1 when ADO cannot
>>>>>>>>>> determine the number of records or if the provider or cursor
>>>>>>>>>> < ms-help://MS.PSDKSVR2003SP1.1033/ado270/htm/mdadef01.htm#mdd efcursor>
>>>>>>>>>> type does not support *RecordCount*. Reading the *RecordCount*
>>>>>>>>>> property on a closed *Recordset* causes an error.
>>>>>>>>>>
>>>>>>>>>> If the *Recordset* object supports approximate positioning or
>>>>>>>>>> bookmarks-that is, *Supports (adApproxPosition)* or *Supports
>>>>>>>>>> (adBookmark)*, respectively, return *True*-this value will be the
>>>>>>>>>> exact number of records in the *Recordset*, regardless of whether
>>>>>>>>>> it has been fully populated. If the *Recordset* object does not
>>>>>>>>>> support approximate positioning, this property may be a
>>>>>>>>>> significant drain on resources because all records will have to be
>>>>>>>>>> retrieved and counted to return an accurate *RecordCount* value.
>>>>>>>>>>
>>>>>>>>>> *NOTE: *In ADO versions 2.8 and earlier, the SQLOLEDB provider
>>>>>>>>>> fetches all records when a server-side cursor is used despite the
>>>>>>>>>> fact that it returns *True* for both *Supports (adApproxPosition)*
>>>>>>>>>> and *Supports (adBookmark)*,
>>>>>>>>>>
>>>>>>>>>> The cursor type of the *Recordset* object affects whether the
>>>>>>>>>> number of records can be determined. The *RecordCount* property
>>>>>>>>>> will return -1 for a forward-only cursor; the actual count for a
>>>>>>>>>> static or keyset cursor; and either -1 or the actual count for a
>>>>>>>>>> dynamic cursor, depending on the data source.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Ignacio Ortiz de Zúñiga
>>>>>>>>>>
http://www.xailer.com
>>>>>>>>>> "Miguel A. Torrellas" <
miguel@torrellas.net
>>>>>>>>>> <mailto:
miguel@torrellas.net>> escribió en el mensaje
>>>>>>>>>> news:46010284$[email=
1@news.xailer.com...]
1@news.xailer.com...[/email]
>>>>>>>>>> > Hola,
>>>>>>>>>> >
>>>>>>>>>> > Siendo ::oAdoCDT un DataSource que ataca a SQLServer
>>>>>>>>>> >
>>>>>>>>>> > WITH OBJECT ::oSQL := TSQLQuery():New( Self )
>>>>>>>>>> > :oDataSource := ::oAdoCdt
>>>>>>>>>> > :cProcess := "GENERAL"
>>>>>>>>>> > :nCursorLocation := adUseServer
>>>>>>>>>> > :nCursorType := adOpenForwardOnly
>>>>>>>>>> > :cSelect := "SELECT * FROM TABLA"
>>>>>>>>>> > :OnPostOpen := {|o| ::oBtnImportar:lEnabled := o:lOpen}
>>>>>>>>>> > :OnPostClose := {|o| ::oBtnImportar:lEnabled := o:lOpen}
>>>>>>>>>> > :Create()
>>>>>>>>>> > END
>>>>>>>>>> >
>>>>>>>>>> > ¿Estas dos lineas que se supone que retornan?
>>>>>>>>>> > ::oSQL:Recno()
>>>>>>>>>> > ::oSQL:RecCount()
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> > Gracias.
>>>>>>>>>> >
>>>>>>>>>> > Saludos. Miguel A. Torrellas
>>>>
>>>
>>
>
>