FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Averiguar SetRelation
Posts: 728
Joined: Fri Oct 07, 2005 07:38 AM
Averiguar SetRelation
Posted: Thu Jun 14, 2007 07:41 AM

Buenasss, 驴sabeis algun m茅todo para averiguar el DbSetRelation() existente en un alias? mi intenci贸n es guardar el relation existente, quitarlo hacer unos procesos y volver a restaurarlo.
Quiero incluirlo en una funci贸n que tengo que guarda el filtro, la posici贸n y el 铆ndice de un alias para luego restaurarlos.

Gracias.

Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Averiguar SetRelation
Posted: Thu Jun 14, 2007 08:35 AM

Angel,

Revisa el c贸digo de function\ErrSysW.prg

Es el error system de FWH y ahi se analizan lon 铆ndices, relaciones, etc. para mostrarlas en el error.log

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 989
Joined: Thu Nov 24, 2005 03:01 PM
Averiguar SetRelation
Posted: Thu Jun 14, 2007 09:44 AM

Te sirve dBRelation()? del NG del Clipper:

Syntax

 DBRELATION(<nRelation>) --> cLinkExp

Arguments

 <nRelation> is the position of the desired relation in the list of
 current work area relations.  The relations are numbered according to
 the order in which they were defined with SET RELATION.

Returns

 DBRELATION() returns a character string containing the linking
 expression of the relation specified by <nRelation>.  If there is no
 RELATION SET for <nRelation>, DBRELATION() returns a null string ("").

Obviamente si en la expresion hay referencias a variables locales, creo que se va a complicar un poco.
Lo ideal ser铆a tener una funcion que retorne una referencia al codeblock que se especifica en el momento de hacer la set relation, no se si en Harbour existe.

Saludos.

Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
鈥淚f you think education is expensive, try ignorance"
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Averiguar SetRelation
Posted: Thu Jun 14, 2007 03:03 PM

Sacto !, dbrelation() es lo que necesitas

Saludos

R.F.

Continue the discussion