I am using TDolphin Lib to access MySQL DB. I am trying to populate a result set into XBROWSE via oServer:Query( ) method. I am passing the xharbour CHAR ( String ) to this Query( ) method to get result set. But one of the Column value is not correct populating actually its coming from another column. So in the XBROWSE it is not displaying correctly. But when I create the view by using same SQL Query and pass view Query as " select * from vw_1" it is displays correctly. But I want to generate SQL query at client side in the xHarbour procedure not at DB Side. Please advise on this.
in the below example Item_ID column's value display for Item_Name which is not correct.
- Code: Select all Expand view
#xtranslate C_VW_VOU_ITEMS_REC (<x>) => " SELECT vi.*, i.ITEM_NAME , im.ITEM_MRP , i.QTY_PER_BOX " +;
" FROM t_vou_items_d"+ oApp:gThisFY +" vi " + ;
" INNER JOIN t_item_m i ON i.ITEM_ID = vi.ITEM_ID " + ;
" INNER JOIN t_item_mrp_m"+ oApp:gThisFY +" im ON im.MRP_ID = vi.MRP_ID" + ;
" WHERE vi.VOU_ID = "+str( <x> )+" ORDER BY vi.SR_NO ASC "
oRGSItems := oApp:gDBServer:Query( C_VW_VOU_ITEMS_REC (0) )
@ 375, 25 XBROWSE oBrwItems SIZE 920, 150 PIXEL OF oWnd ;
COLUMNS { "MRP_ID", "ITEM_NAME"} ;
FONT oApp:oFontBrw1 ;
OBJECT oRGSItems