FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 12:15 AM
Saludos,

Eso mismo, necesito cambiar el where de un query en tiempo de ejecucion.-
Code (fw): Select all Collapse
 o:= oMysql:Query( "select numeros, vendido, (vendido*precio) as total from doctempo where pestana='1' and loteria='2'" ) 
 o:cWhere := "pestana ='2' and loteria = '4'"
Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 12:23 AM

Pablo...

y cual es el problema que te genera?

Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 12:46 AM

Daniel no me asume el nuevo where

Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 302
Joined: Fri Apr 23, 2010 04:30 AM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 05:10 PM

Hola,

debes hacer un refresh para que te refresque el query y aplique el nuevo where

Slds

NMM

Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 05:17 PM
Code (fw): Select all Collapse
 oQuery := oMysql:Query( "select * from presidentes where nombre='JUAN DE LOS PALOTES'" )
 oQuery:SetWhere( "nombre='TUNOMBRE'" )
 oQuery:Refresh()
Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 05:20 PM
Pablo

Tambien puedes hacer

Code (fw): Select all Collapse
oQuery:SetWhere( "nombre='TUNOMBRE'", .T. )

el segundo parametro envia un valor logico para refrescar el query

tomado desde la clase
Code (fw): Select all Collapse
METHOD SetWhere( cWhere, lRefresh )   INLINE ::SetNewFilter( SET_WHERE, cWhere, lRefresh )
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Tue Mar 15, 2011 06:37 PM

Gracias Daniel :)

Recuerdate del asunto aquel

Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Wed Mar 16, 2011 01:38 AM

Pablo...

no te he visto conectado... enviame una forma de como comunicarme contigo

Gracias

Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: tDolphin :: Cambiar where de un query en tiempo de ejecucion
Posted: Wed Mar 16, 2011 02:12 AM

enviame un mail a: pabloalbertovidal arroba gmail punto com

Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/

Continue the discussion