Editar celdas en xbrowse

Editar celdas en xbrowse

Postby jpcavagnaro » Thu Aug 31, 2023 1:49 pm

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 los campos 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.
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.

Re: Editar celdas en xbrowse

Postby nageswaragunupudi » Thu Aug 31, 2023 4:57 pm

Code: Select all  Expand view  RUN
WITH OBJECT oLbx:Costo
:nEditType := EDIT_GET
END
 


Please remove bPostEdit
Xbrowse internally prepares a better bPostEdit codeblock by default.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editar celdas en xbrowse

Postby jpcavagnaro » Thu Aug 31, 2023 11:08 pm

No me funciono, falta algo?
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.

Re: Editar celdas en xbrowse

Postby nageswaragunupudi » Fri Sep 01, 2023 9:33 am

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 view  RUN
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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editar celdas en xbrowse

Postby jpcavagnaro » Tue Sep 05, 2023 1:34 pm

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
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.

Re: Editar celdas en xbrowse

Postby cmsoft » Tue Sep 05, 2023 10:39 pm

Jorge, que usas para conectarte con MySql?
La clase nativa?
Dolphin?
ADO?
User avatar
cmsoft
 
Posts: 1291
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Editar celdas en xbrowse

Postby nageswaragunupudi » Tue Sep 05, 2023 11:25 pm

Usage of "dbo." and " oRSSTK:Fields( "costo" ):Value := x" indicates that it is MS SQL with ADO.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Editar celdas en xbrowse

Postby jpcavagnaro » Sat Sep 09, 2023 11:05 am

Si uso ADO, es microsoft sql.
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 78 guests