FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour TDolphin no encuentra un campo existe...
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
TDolphin no encuentra un campo existe...
Posted: Tue Jun 14, 2011 11:24 AM
Hola.
Code (fw): Select all Collapse
atablas:= {"tbcyp", "tbdatos"}
aColumnas:= {"tbcyp.id", "tbdatos.id", "tbdatos.tipo"}
cWhere:= "tbcyp.id = tbdatos.id"

cQuery:=buildquery(acolumnas, atablas, cwhere)
oQuery:= tDolphinQry():new(cquery, ::oServidor)


Al querer mostrarlo en un xbrowse pasandole que campos quiero mostrar me dice que el segunda campo no existe

Code (fw): Select all Collapse
setdolphin(::oServidor, .t., .f., {"id", "tbdatos.id"})
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: TDolphin no encuentra un campo existe...
Posted: Tue Jun 14, 2011 11:33 AM
Hola


para camnpos con el mismo nombre deberas usar un alias para el campo

Code (fw): Select all Collapse
aColumnas:= {"tbcyp.id as id1", "tbdatos.id as id2", "tbdatos.tipo"}



Code (fw): Select all Collapse
setdolphin(::oServidor, .t., .f., {"id1", "id2"})
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: TDolphin no encuentra un campo existe... (solucionado)
Posted: Tue Jun 14, 2011 11:35 AM

quedo.
gracias.

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Continue the discussion