Averiguar SetRelation

Averiguar SetRelation

Postby AngelSalom » Thu Jun 14, 2007 7: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
User avatar
AngelSalom
 
Posts: 708
Joined: Fri Oct 07, 2005 7:38 am
Location: Benicarló (Castellón ) - España

Postby Antonio Linares » Thu Jun 14, 2007 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41468
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Carlos Mora » Thu Jun 14, 2007 9: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.
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Postby R.F. » Thu Jun 14, 2007 3:03 pm

Sacto !, dbrelation() es lo que necesitas
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 143 guests