Thank you.
Unforgivable oversight on our part.
Problem with xBrowse (Fixed)
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Problem with xBrowse
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Problem with xBrowse
Master, your great knowledge and your humility make you great, thank you.
Saludos,
Carlos Gallego
*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Carlos Gallego
*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Re: Problem with xBrowse
Mr. Rao and Mr Carlos:
With the advice of Mr. Gallego, now everything is going very well.
I already breathe better
Can you explain to me the function of the H and the S?
Thank you very much to both
With best regards
With the advice of Mr. Gallego, now everything is going very well.
I already breathe better
Can you explain to me the function of the H and the S?
Thank you very much to both
With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Re: Problem with xBrowse (Fixed)
Armando,
The problem is related with xBrowse.
If you run your example without including the xBrowse instantiation
@ oBar:nHeight, 0 XBROWSE oBrw SIZE 0,-30 PIXEL OF oDlg ;
DATA SOURCE oRsHdr ;
COLUMNS "HDR_FOL","HDR_FDM","HDR_REF",;
"HDR_EOS",;
"HDR_TOU",;
....
and in exchange you use
cSql := "SELECT *,S.SUC_NOM FROM HdrVda H LEFT JOIN Branches S ON H.HDR_SUC = S.SUC_NUM ORDER BY HDR_FOL"
FW_OpenRecordSet( oCn , cSql )
xBrowse(oRsHdr)
You will see that the syntax without the "H" of the alias works correctly
But if you want to use @oBar:nHeight, 0 XBROWSE oBrw SIZE 0,-30 PIXEL OF oDlg .....
you have to write
cSql := "SELECT H.*,S.SUC_NOM FROM HdrVda H LEFT JOIN Branches S ON H.HDR_SUC = S.SUC_NUM ORDER BY HDR_FOL"
That is, forcing the identification of each object on the LEFT table with its alias "H".
I think it is something related to XBROWSE. Perhaps the master Rao can shed more light on this.
H and S are aliases to indentify LEFT and RIGHT tables (hdrvda and sucursales in your example). Each field in table hdrva will be invoked with prefix "H.": H.HDR_FOL, H.HDR_EOS, H.HDR_SUC, etc., and each field of table sucursales will be invoked with prefix "S.": S.SUC_NUM,
S.SUC_NOM. This is very usefull when you have a field with the same name in both tables you are joining.
Regards,
The problem is related with xBrowse.
If you run your example without including the xBrowse instantiation
@ oBar:nHeight, 0 XBROWSE oBrw SIZE 0,-30 PIXEL OF oDlg ;
DATA SOURCE oRsHdr ;
COLUMNS "HDR_FOL","HDR_FDM","HDR_REF",;
"HDR_EOS",;
"HDR_TOU",;
....
and in exchange you use
cSql := "SELECT *,S.SUC_NOM FROM HdrVda H LEFT JOIN Branches S ON H.HDR_SUC = S.SUC_NUM ORDER BY HDR_FOL"
FW_OpenRecordSet( oCn , cSql )
xBrowse(oRsHdr)
You will see that the syntax without the "H" of the alias works correctly
But if you want to use @oBar:nHeight, 0 XBROWSE oBrw SIZE 0,-30 PIXEL OF oDlg .....
you have to write
cSql := "SELECT H.*,S.SUC_NOM FROM HdrVda H LEFT JOIN Branches S ON H.HDR_SUC = S.SUC_NUM ORDER BY HDR_FOL"
That is, forcing the identification of each object on the LEFT table with its alias "H".
I think it is something related to XBROWSE. Perhaps the master Rao can shed more light on this.
H and S are aliases to indentify LEFT and RIGHT tables (hdrvda and sucursales in your example). Each field in table hdrva will be invoked with prefix "H.": H.HDR_FOL, H.HDR_EOS, H.HDR_SUC, etc., and each field of table sucursales will be invoked with prefix "S.": S.SUC_NUM,
S.SUC_NOM. This is very usefull when you have a field with the same name in both tables you are joining.
Regards,
Saludos,
Carlos Gallego
*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Carlos Gallego
*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Re: Problem with xBrowse (Fixed)
Carlos:
it became very clear
Thank you.
With best regards
it became very clear
Thank you.
With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero