In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Help us give Edit and Delete Option in this project.
-
- Mensajes: 146
- Registrado: Dom Dic 27, 2009 9:54 am
Help us give Edit and Delete Option in this project.
Dear Sir,
We are trying to follow the sample project given by you on this link : https://xaweb.ozs.es/cgi-bin/tablescrud.xaweb.
We tried to replicate the same with Maria data source (Backup of the same is there in the attached project).
Append facility is working fine. But Edit and Delete is not working.
Kindly help us to kick start the process of development in xaWeb.
TIA
Milan Mehta.
We are trying to follow the sample project given by you on this link : https://xaweb.ozs.es/cgi-bin/tablescrud.xaweb.
We tried to replicate the same with Maria data source (Backup of the same is there in the attached project).
Append facility is working fine. But Edit and Delete is not working.
Kindly help us to kick start the process of development in xaWeb.
TIA
Milan Mehta.
- Adjuntos
-
- xaweb_Bansel.rar
- (492.62 KiB) Descargado 24 veces
- ignacio
- Site Admin
- Mensajes: 9466
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Help us give Edit and Delete Option in this project.
Hi,
//:OnSubmit := :SubmitToService( "Srv_TableEdit", .T. )
With this code commented is impossible to edit.
Regards,
//:OnSubmit := :SubmitToService( "Srv_TableEdit", .T. )
With this code commented is impossible to edit.
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 146
- Registrado: Dom Dic 27, 2009 9:54 am
Re: Help us give Edit and Delete Option in this project.
We get error while we try to delete. It deletes the record in the database. But failes to refresh the screen, giving out following error :
Error on D:\Project\xaweb_Bansel\Bansal.xaweb: Argument error / + - BASE [1081]
Called from:
WDOCMAIN:RENDER(500)
WENGINE:RENDER(471)
(b)ZENGINE(121)
WENGINE:END(0)
WAPP:END(139)
(b)ZAPP(90)
WAPP:RUN(0)
MAIN(13)
Execute time in milliseconds: 22
Error on D:\Project\xaweb_Bansel\Bansal.xaweb: Argument error / + - BASE [1081]
Called from:
WDOCMAIN:RENDER(500)
WENGINE:RENDER(471)
(b)ZENGINE(121)
WENGINE:END(0)
WAPP:END(139)
(b)ZAPP(90)
WAPP:RUN(0)
MAIN(13)
Execute time in milliseconds: 22
- Adjuntos
-
- xaweb_Bansel.rar
- (491.75 KiB) Descargado 29 veces
- ignacio
- Site Admin
- Mensajes: 9466
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Help us give Edit and Delete Option in this project.
Hi,
Sorry for the delay. Please confirm you are using the latest version 1.0.3 of xaWeb since the line 500 on zDoc.prg module is not on Render() method and is impossible to trace the error.
BTW, I highly appreciate if you can do a very little sample showing the problem. In any case I will try to create a version of the sample 73 using MariaDB.
Regards,
Sorry for the delay. Please confirm you are using the latest version 1.0.3 of xaWeb since the line 500 on zDoc.prg module is not on Render() method and is impossible to trace the error.
BTW, I highly appreciate if you can do a very little sample showing the problem. In any case I will try to create a version of the sample 73 using MariaDB.
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 146
- Registrado: Dom Dic 27, 2009 9:54 am
Re: Help us give Edit and Delete Option in this project.
We are using version 1.0.3.
Please find attached a small self-contained example.
The database dump is also there in the attached file.
Kindly help us out.
TIA
Milan
Please find attached a small self-contained example.
The database dump is also there in the attached file.
Kindly help us out.
TIA
Milan
- Adjuntos
-
- xaweb_Bansel.rar
- (296.92 KiB) Descargado 12 veces
- ignacio
- Site Admin
- Mensajes: 9466
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Help us give Edit and Delete Option in this project.
Hello,
IMPORTANT NOTE: xaWeb services only return JSON strings.
Try this:
IMPORTANT NOTE: xaWeb services only return JSON strings.
Try this:
Código: Seleccionar todo
METHOD Srv_TableDelete( hPost ) CLASS WDocMain
LOCAL hData := Engine:hCargo
LOCAL nId := 0, cSql
LOCAL hResult := {=>}
IF HB_HHasKey( hData, "Vou. No." )
nId := Val( hData[ "Vou. No." ] )
IF nId > 0
cSql := "DELETE FROM do WHERE vno = " + HB_ValToExp(nId)
IF ::oDs:Execute(cSql)
HB_HSet( hResult, "pass", .T. )
ENDIF
ENDIF
ENDIF
RETURN HB_JsonEncode( hResult )
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 146
- Registrado: Dom Dic 27, 2009 9:54 am
Re: Help us give Edit and Delete Option in this project.
Thanks a lot. The problem is solved!
Just help a bit more. It did delete the record from the database.
However, browse still shows the record. How to refresh the screen ?
TIA
Milan.
Just help a bit more. It did delete the record from the database.
However, browse still shows the record. How to refresh the screen ?
TIA
Milan.
- ignacio
- Site Admin
- Mensajes: 9466
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Help us give Edit and Delete Option in this project.
You need a TRUE web server. This video is done with XAMPP+Windows.
Regards
NOTE: Xailer IDE navigator does not support FETCH operations.
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com