Fichero adjunto a la pregunta
Publicado: Lun Ene 16, 2006 5:33 pm
Emilio,
Con la nueva versión de xHarbour estas lineas ya no hacen falta:
> REQUEST _ADS
> RddRegister("ADS",1)
Un saludo,
"Emilio Gil" <emilio@iplasticas.com> escribió en el mensaje
news:43cbca0e$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Como no me deja enviar el archivo de proyecto *.zip adjunto el *.prg al
> que gace referencia el error.
>
> Gracias.
>
------------------------------------------------------------ --------------------
> /*
> * Proyecto: man
> * Fichero: ent_ads.prg
> * Descripción:
> * Autor:
> * Fecha: 21/11/2005
> */
>
> #include "Xailer.ch"
> #include "ads.ch"
>
> CLASS ent_visi FROM TForm
>
> COMPONENT oImage1
> COMPONENT oLabel1
> COMPONENT oLabel2
> COMPONENT oLabel3
> COMPONENT oLabel4
> COMPONENT oUnidad
> COMPONENT oClave
> COMPONENT oPin
> COMPONENT oEjer
> COMPONENT oBotEntrada
> COMPONENT oGroupBox1
> COMPONENT oGroupBox2
>
> METHOD CreateForm()
> METHOD UnidadExit( oSender, oNextCtl )
> METHOD PinExit( oSender, oNextCtl )
> METHOD FormInitialize( oSender )
> METHOD BotEntradaClick( oSender )
> METHOD FormClose( oSender, @lClose )
>
> ENDCLASS
>
> #include "ent_visi.xfm"
>
> //---------------------------------------------------------- --------------------
>
> METHOD UnidadExit( oSender, oNextCtl ) CLASS ent_visi
> Local cUnidad := oSender:Value()
>
> REQUEST ADSGETRELKEYPOS
> REQUEST _ADS, ADSKeyNo, ADSKeyCount
> RddRegister("ADS",1)
> rddSetDefault("ADS")
>
> IF cUnidad == "F"
> SET SERVER REMOTE
> else
> SET SERVER LOCAL
> ENDIF
>
> SET FILETYPE TO NTX
> SET AXS LOCKING OFF
>
> IF alias() != "AGENTE"
> NetUse(cUnidad + ":historicagente",,,"agente")
> NetInde({cUnidad + ":historicagente3"})
> ENDIF
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD PinExit( oSender, oNextCtl ) CLASS ent_visi
> Local cPin := oSender:Value()
>
> if !existe(cPin,"agente")
> RETURN .F.
> endif
> ::oParent:oCodag:Value := Agente->Codag
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD FormInitialize( oSender ) CLASS ent_visi
> Local x := len(dtoc(date())) - 6
> Local lEjer:=subs(dtoc(date()),7,x)
> oSender:oEjer:Value() := lEjer
> oSender:cText := ::oParent:cText()
>
>
> SET CONF ON
> SET EXCLUSIVE OFF
> SET DELE ON
> SET INTE ON
> SET ECHO OFF
> SET TALK OFF
> SET DATE BRIT
> SET STAT OFF
> SET BELL OFF
> SET SAFETY ON
> SET WRAP ON
> SET EPOCH TO 1975
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD BotEntradaClick( oSender ) CLASS ent_visi
> Local cUnidad := ::oUnidad:Value()
> Local lEjer := ::oEjer:Value()
> Local lClave := ::oClave:Value()
> Local cPin := ::oPin:Value()
> Local lXejer, direc, subdir1, subdir2, subdir3, subdir4, subdir5, subdir6
> Local cNivel, cPrograma
>
> if len(lEjer) == 2
> lXejer := lEjer
> else
> lXejer := subs(lEjer,3,2)
> endif
>
> DO CASE
> case lClave == "3322"
> direc:= cUnidad + ":ip"
> subdir3:= cUnidad + ":historic"
> subdir6:= cUnidad + ":eje"+lXejer
> case lClave == "2211"
> direc:= cUnidad + ":vip"
> subdir3:="F:historic"
> subdir6:="F:eje"+lXejer
> case lClave == "6655"
> direc:="F:canip"
> subdir3:="F:canhistoric"
> subdir6:="F:caneje"+lXejer
> case lClave == "5544"
> direc:="F:canvip"
> subdir3:="F:canhistoric"
> subdir6:="F:caneje"+lXejer
> otherwise
> clos all
> quit
> endcase
>
> subdir1:=direc+"historic"
> subdir2:=direc+"eje"+lXejer
> subdir4:=direc+"eje"+lXejer+"cuentas"
> subdir5:=subdir3+";"+subdir6+";"+subdir2+";"+subdir1
>
> ** obligatorio pasar todo el path en una sola macro
> set path to &subdir5.
>
> if .not. file("contsys.dbf")
> MsgInfo("Ejercicio no accesible")
> clos all
> quit
> endif
>
> clos all
> *** definir las variables de entorno para la aplicaci¢n
>
>
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD FormClose( oSender, lClose ) CLASS ent_visi
>
> /* Para que funcione esto hay que tener claro que cerrar con [X] devuelve
> como
> valor de ::oForm:nModalResult() -> 0 que es el equivalente a mrNone, por
> lo
> tanto si hay algun botón en el dialogo hay que poner la propiedad
> nModalResult
> distinta de mrNone
> */
> if ::oForm:nModalResult() == 0 // valor mRNone
> clos all
> quit
> endif
> */
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
Con la nueva versión de xHarbour estas lineas ya no hacen falta:
> REQUEST _ADS
> RddRegister("ADS",1)
Un saludo,
"Emilio Gil" <emilio@iplasticas.com> escribió en el mensaje
news:43cbca0e$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Como no me deja enviar el archivo de proyecto *.zip adjunto el *.prg al
> que gace referencia el error.
>
> Gracias.
>
------------------------------------------------------------ --------------------
> /*
> * Proyecto: man
> * Fichero: ent_ads.prg
> * Descripción:
> * Autor:
> * Fecha: 21/11/2005
> */
>
> #include "Xailer.ch"
> #include "ads.ch"
>
> CLASS ent_visi FROM TForm
>
> COMPONENT oImage1
> COMPONENT oLabel1
> COMPONENT oLabel2
> COMPONENT oLabel3
> COMPONENT oLabel4
> COMPONENT oUnidad
> COMPONENT oClave
> COMPONENT oPin
> COMPONENT oEjer
> COMPONENT oBotEntrada
> COMPONENT oGroupBox1
> COMPONENT oGroupBox2
>
> METHOD CreateForm()
> METHOD UnidadExit( oSender, oNextCtl )
> METHOD PinExit( oSender, oNextCtl )
> METHOD FormInitialize( oSender )
> METHOD BotEntradaClick( oSender )
> METHOD FormClose( oSender, @lClose )
>
> ENDCLASS
>
> #include "ent_visi.xfm"
>
> //---------------------------------------------------------- --------------------
>
> METHOD UnidadExit( oSender, oNextCtl ) CLASS ent_visi
> Local cUnidad := oSender:Value()
>
> REQUEST ADSGETRELKEYPOS
> REQUEST _ADS, ADSKeyNo, ADSKeyCount
> RddRegister("ADS",1)
> rddSetDefault("ADS")
>
> IF cUnidad == "F"
> SET SERVER REMOTE
> else
> SET SERVER LOCAL
> ENDIF
>
> SET FILETYPE TO NTX
> SET AXS LOCKING OFF
>
> IF alias() != "AGENTE"
> NetUse(cUnidad + ":historicagente",,,"agente")
> NetInde({cUnidad + ":historicagente3"})
> ENDIF
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD PinExit( oSender, oNextCtl ) CLASS ent_visi
> Local cPin := oSender:Value()
>
> if !existe(cPin,"agente")
> RETURN .F.
> endif
> ::oParent:oCodag:Value := Agente->Codag
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD FormInitialize( oSender ) CLASS ent_visi
> Local x := len(dtoc(date())) - 6
> Local lEjer:=subs(dtoc(date()),7,x)
> oSender:oEjer:Value() := lEjer
> oSender:cText := ::oParent:cText()
>
>
> SET CONF ON
> SET EXCLUSIVE OFF
> SET DELE ON
> SET INTE ON
> SET ECHO OFF
> SET TALK OFF
> SET DATE BRIT
> SET STAT OFF
> SET BELL OFF
> SET SAFETY ON
> SET WRAP ON
> SET EPOCH TO 1975
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD BotEntradaClick( oSender ) CLASS ent_visi
> Local cUnidad := ::oUnidad:Value()
> Local lEjer := ::oEjer:Value()
> Local lClave := ::oClave:Value()
> Local cPin := ::oPin:Value()
> Local lXejer, direc, subdir1, subdir2, subdir3, subdir4, subdir5, subdir6
> Local cNivel, cPrograma
>
> if len(lEjer) == 2
> lXejer := lEjer
> else
> lXejer := subs(lEjer,3,2)
> endif
>
> DO CASE
> case lClave == "3322"
> direc:= cUnidad + ":ip"
> subdir3:= cUnidad + ":historic"
> subdir6:= cUnidad + ":eje"+lXejer
> case lClave == "2211"
> direc:= cUnidad + ":vip"
> subdir3:="F:historic"
> subdir6:="F:eje"+lXejer
> case lClave == "6655"
> direc:="F:canip"
> subdir3:="F:canhistoric"
> subdir6:="F:caneje"+lXejer
> case lClave == "5544"
> direc:="F:canvip"
> subdir3:="F:canhistoric"
> subdir6:="F:caneje"+lXejer
> otherwise
> clos all
> quit
> endcase
>
> subdir1:=direc+"historic"
> subdir2:=direc+"eje"+lXejer
> subdir4:=direc+"eje"+lXejer+"cuentas"
> subdir5:=subdir3+";"+subdir6+";"+subdir2+";"+subdir1
>
> ** obligatorio pasar todo el path en una sola macro
> set path to &subdir5.
>
> if .not. file("contsys.dbf")
> MsgInfo("Ejercicio no accesible")
> clos all
> quit
> endif
>
> clos all
> *** definir las variables de entorno para la aplicaci¢n
>
>
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> METHOD FormClose( oSender, lClose ) CLASS ent_visi
>
> /* Para que funcione esto hay que tener claro que cerrar con [X] devuelve
> como
> valor de ::oForm:nModalResult() -> 0 que es el equivalente a mrNone, por
> lo
> tanto si hay algun botón en el dialogo hay que poner la propiedad
> nModalResult
> distinta de mrNone
> */
> if ::oForm:nModalResult() == 0 // valor mRNone
> clos all
> quit
> endif
> */
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>