Re: Ayuda principiante
Publicado: Sab Nov 18, 2006 12:09 pm
si mal no recuerdo, AddNew ya te deja bloqieado el registro, ademas, que
rlock no pertenece a ningun DataSet.
Si usas DataSet debes usar los methodos de este: oDataSet:RecLock.
prueba quitando el RLock, y si no a como te puse anteriormente.
Saludos.
--
Ramón Zea
ramonzea@yahoo.com
zeasoftware@hotmail.com
zeasoft.movil@hotmail.com
http://www.paginasprodigy.com/zeasoft/
"PILO" <srmpilo@hotmail.com> escribió en el mensaje
news:[email=455ee11e@news.xailer.com...]455ee11e@news.xailer.com...[/email]
>
> Los tdbedit que estan el fondo en blanco, estan con datos de un dataset
> del
> formulario que lo lanza
> Los que estan con fondo blanco son tedit de este formulario
> el tdbbrowse es otro dataset pero de este formulario
> Necesito si alguien me puede ayudar con ejemplos
> Quiero hacer
> Cuando pulso el boton OK
> tengo que añadir los valores que hay en los tdbedit con fondo blanco de
> dataset de formulario anterior
> al dataset1 de este formulario y ademas los valores de los tedit y
> tdateedit, estos dos ultimos me los pasa
> pero los otro me los pasa en blanco, utilizo de la siguiente forma
>
> /*
> * Proyecto: ETIQUETAR
> * Fichero: ENVIOS.prg
> * Descripción:
> * Autor:
> * Fecha: 16/11/2006
> */
>
> #include "Xailer.ch"
>
> CLASS Tenvios FROM TForm
>
> COMPONENT oDBEdit1
> COMPONENT oOK
> COMPONENT oCancel
> COMPONENT oDBEdit2
> COMPONENT oDBEdit3
> COMPONENT oDBEdit4
> COMPONENT oDBEdit5
> COMPONENT oDBEdit6
> COMPONENT oCdxDataSource1
> COMPONENT oDbfDataSet1
> COMPONENT oDBBrowse1
> COMPONENT BULTOS
> COMPONENT oLabel1
> COMPONENT oLabel2
> COMPONENT oDateEdit1
>
> PUBLIC BULTOS := 1
> PUBLIC FECHAENVIO := DATE()
> PUBLIC PERSONAENVIO := SPACE(36)
>
> METHOD CreateForm()
> METHOD fistcreater( oSender )
> METHOD OKDblClick( oSender, nKeyFlags, nPosX, nPosY )
>
> ENDCLASS
>
> #include "ENVIOS.xfm"
>
> //---------------------------------------------------------- --------------------
>
> METHOD fistcreater( oSender ) CLASS Tenvios
> oSender:oDataSet := ::oParent:oDataSet
> RETURN Nil
>
>
> //---------------------------------------------------------- --------------------
>
> METHOD OKDblClick( oSender, nKeyFlags, nPosX, nPosY ) CLASS Tenvios
> ::oDbfDataSet1:AddNew()
> if rlock()
> ::oDbfDataSet1:CODIGO := ::oDBEdit1:oDataField
> ::oDbfDataSet1:RAZONSOCI := ::oDBEdit2:oDataField
> ::oDbfDataSet1:DIRECCION := ::oDBEdit3:oDataField
> ::oDbfDataSet1:CODIPOS := ::oDBEdit4:oDataField
> ::oDbfDataSet1:POBLACION := ::oDBEdit5:oDataField
> ::oDbfDataSet1:PROVINCIA := ::oDBEdit6:oDataField
> ::oDbfDataSet1:BULTOS := ::bultos:value
> ::oDbfDataSet1:ETIQUETADO := ::oDBEdit1:oDataField
> ::oDbfDataSet1:FE_ENVIO := ::oDateEdit1:Value
> ::oDbfDataSet1:FE_PEDI := ::oDateEdit1:Value
> ::oDbfDataSet1:Update()
> unlock
> endif
> MsgInfo("boton ok pulsado")
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> Con esto no me funciona ni actualiza los datos
> ni tampoco me sale el msginfo
>
> Gracias de antemano
>
>
rlock no pertenece a ningun DataSet.
Si usas DataSet debes usar los methodos de este: oDataSet:RecLock.
prueba quitando el RLock, y si no a como te puse anteriormente.
Saludos.
--
Ramón Zea
ramonzea@yahoo.com
zeasoftware@hotmail.com
zeasoft.movil@hotmail.com
http://www.paginasprodigy.com/zeasoft/
"PILO" <srmpilo@hotmail.com> escribió en el mensaje
news:[email=455ee11e@news.xailer.com...]455ee11e@news.xailer.com...[/email]
>
> Los tdbedit que estan el fondo en blanco, estan con datos de un dataset
> del
> formulario que lo lanza
> Los que estan con fondo blanco son tedit de este formulario
> el tdbbrowse es otro dataset pero de este formulario
> Necesito si alguien me puede ayudar con ejemplos
> Quiero hacer
> Cuando pulso el boton OK
> tengo que añadir los valores que hay en los tdbedit con fondo blanco de
> dataset de formulario anterior
> al dataset1 de este formulario y ademas los valores de los tedit y
> tdateedit, estos dos ultimos me los pasa
> pero los otro me los pasa en blanco, utilizo de la siguiente forma
>
> /*
> * Proyecto: ETIQUETAR
> * Fichero: ENVIOS.prg
> * Descripción:
> * Autor:
> * Fecha: 16/11/2006
> */
>
> #include "Xailer.ch"
>
> CLASS Tenvios FROM TForm
>
> COMPONENT oDBEdit1
> COMPONENT oOK
> COMPONENT oCancel
> COMPONENT oDBEdit2
> COMPONENT oDBEdit3
> COMPONENT oDBEdit4
> COMPONENT oDBEdit5
> COMPONENT oDBEdit6
> COMPONENT oCdxDataSource1
> COMPONENT oDbfDataSet1
> COMPONENT oDBBrowse1
> COMPONENT BULTOS
> COMPONENT oLabel1
> COMPONENT oLabel2
> COMPONENT oDateEdit1
>
> PUBLIC BULTOS := 1
> PUBLIC FECHAENVIO := DATE()
> PUBLIC PERSONAENVIO := SPACE(36)
>
> METHOD CreateForm()
> METHOD fistcreater( oSender )
> METHOD OKDblClick( oSender, nKeyFlags, nPosX, nPosY )
>
> ENDCLASS
>
> #include "ENVIOS.xfm"
>
> //---------------------------------------------------------- --------------------
>
> METHOD fistcreater( oSender ) CLASS Tenvios
> oSender:oDataSet := ::oParent:oDataSet
> RETURN Nil
>
>
> //---------------------------------------------------------- --------------------
>
> METHOD OKDblClick( oSender, nKeyFlags, nPosX, nPosY ) CLASS Tenvios
> ::oDbfDataSet1:AddNew()
> if rlock()
> ::oDbfDataSet1:CODIGO := ::oDBEdit1:oDataField
> ::oDbfDataSet1:RAZONSOCI := ::oDBEdit2:oDataField
> ::oDbfDataSet1:DIRECCION := ::oDBEdit3:oDataField
> ::oDbfDataSet1:CODIPOS := ::oDBEdit4:oDataField
> ::oDbfDataSet1:POBLACION := ::oDBEdit5:oDataField
> ::oDbfDataSet1:PROVINCIA := ::oDBEdit6:oDataField
> ::oDbfDataSet1:BULTOS := ::bultos:value
> ::oDbfDataSet1:ETIQUETADO := ::oDBEdit1:oDataField
> ::oDbfDataSet1:FE_ENVIO := ::oDateEdit1:Value
> ::oDbfDataSet1:FE_PEDI := ::oDateEdit1:Value
> ::oDbfDataSet1:Update()
> unlock
> endif
> MsgInfo("boton ok pulsado")
>
> RETURN Nil
>
> //---------------------------------------------------------- --------------------
>
> Con esto no me funciona ni actualiza los datos
> ni tampoco me sale el msginfo
>
> Gracias de antemano
>
>