Page 1 of 1

Editar celdas en xbrowse

Posted: Thu Aug 31, 2023 1:49 pm
by jpcavagnaro
Hola gente, tengo un xbrowse de esta consulta:

cSQL := "SELECT s.Codigo, s.Codbarra, s.Descri, s.Precio_vta, s.Cantid, s.Cantid1, s.Cantid2, s.Cantid3, s.Cantid4, s.Rubro, s.Descri1, s.Marca, s.Costo, s.Minimo, s.Lote, s.Porc_iva, s.Gravado, s.Fec_alta, " + ;
" s.Fec_modi, s.Descu1, s.Descu2, s.Descu3, s.Descu4, s.Ult_prov, s.moneda, s.Disconti, m.Cotiza, dbo.Proveed.Nombre, dbo.Marcas.Nombre AS nommarca " + ;
"FROM dbo.Stock AS s INNER JOIN " + ;
" dbo.Monedas AS m ON s.moneda = m.Descri INNER JOIN " + ;
" dbo.Proveed ON s.Ult_prov = dbo.Proveed.Numero INNER JOIN " + ;
" dbo.Marcas ON s.Marca = dbo.Marcas.Numero "

Como puedo hacer una edición por celdas de _ de la base Stock

intente con:
WITH OBJECT oLbx:Costo
:bOnPostEdit := { | o, x, k | oRSSTK:Fields( "costo" ):Value := x } //PostEdit( o, x, k ) } // EditaCelda( oaufactu, 1, x, k, lFirstEdit ) } // PostEdit(o,x,k) }
:nEditType := EDIT_GET
END

pero no actualiza, seguro me falta algo.

Re: Editar celdas en xbrowse

Posted: Thu Aug 31, 2023 4:57 pm
by nageswaragunupudi

Code: Select all | Expand

WITH OBJECT oLbx:Costo
:nEditType := EDIT_GET
END
 
Please remove bPostEdit
Xbrowse internally prepares a better bPostEdit codeblock by default.

Re: Editar celdas en xbrowse

Posted: Thu Aug 31, 2023 11:08 pm
by jpcavagnaro
No me funciono, falta algo?

Re: Editar celdas en xbrowse

Posted: Fri Sep 01, 2023 9:33 am
by nageswaragunupudi
I understand you are using ADO with MSSQL (Microsoft SQL).
Right?

We can not say why are you not able to save, unless we test your program at our end.

For this purpose, FWH provides an MSSQL server in the Cloud.
You can connect to this server by calling

Code: Select all | Expand

oCn := FW_MSSQLDB
You can upload or create small sample tables of your own on this server.
Then we both can test the program on this databse.
That helps us to provide you the right support.

Re: Editar celdas en xbrowse

Posted: Tue Sep 05, 2023 1:34 pm
by jpcavagnaro
Lo que está creando el conflicto es el INNER JOIN:

cSQL := "SELECT s.id, s.Codigo, s.Codbarra, s.Descri, s.Precio_vta, s.Cantid, s.Cantid1, s.Cantid2, s.Cantid3, s.Cantid4, s.Rubro, s.Descri1, s.Marca, s.Costo, s.Minimo, s.Lote, s.Porc_iva, s.Gravado, s.Fec_alta, " + ;
" s.Fec_modi, s.Descu1, s.Descu2, s.Descu3, s.Descu4, s.Ult_prov, s.moneda, s.Disconti, m.Cotiza, dbo.Proveed.Nombre, dbo.Marcas.Nombre AS nommarca " + ;
"FROM dbo.Stock AS s INNER JOIN " + ;
" dbo.Monedas AS m ON s.moneda = m.Descri INNER JOIN " + ;
" dbo.Proveed ON s.Ult_prov = dbo.Proveed.Numero INNER JOIN " + ;
" dbo.Marcas ON s.Marca = dbo.Marcas.Numero "

Si lo hago "select * from stock" funciona bien

Re: Editar celdas en xbrowse

Posted: Tue Sep 05, 2023 10:39 pm
by cmsoft
Jorge, que usas para conectarte con MySql?
La clase nativa?
Dolphin?
ADO?

Re: Editar celdas en xbrowse

Posted: Tue Sep 05, 2023 11:25 pm
by nageswaragunupudi
Usage of "dbo." and " oRSSTK:Fields( "costo" ):Value := x" indicates that it is MS SQL with ADO.

Re: Editar celdas en xbrowse

Posted: Sat Sep 09, 2023 11:05 am
by jpcavagnaro
Si uso ADO, es microsoft sql.