Hello,
Should the table being used be set to any specific active index
tag ? If yes, to ListField index or ItemField Index ?
I am gettig quite strange result with it.
Here is the small example demonstrating the same.
In this example, selecting 'ABC' should return 1 instead it returns 2,
selecting 'XYZ' should return 2 instead it returns 2 ,
selecting 'DEF' returns correctly 3.
Please help
Milan.
----------------Prg------------------------
# include "fivewin.ch"
# INCLUDE "dbcombo.ch"
#define PBSEARCHOK 10121
#define CBDIARY 10122
PROCEDURE Main
LOCAL oDlg, oMiscInfo, cMiscInfo
LOCAL oDlgSearch, oVno, nVno, nRecNo
Cret_Table()
SELE 0
USE Test
appe blank
REPLACE VNO WITH 1, NAME WITH 'ABC'
appe blank
REPLACE VNO WITH 2, NAME WITH 'XYZ'
appe blank
REPLACE VNO WITH 3, NAME WITH 'DEF'
INDEX ON VNO TAG VNO
INDEX ON NAME TAG NAME
DEFINE DIALOG oDlgSearch RESOURCE "Search"
nVno := Test->VNO
Select Test
Set ORDER TO TAG name
REDEFINE DBCOMBO oVno VAR nVno ID CBDIARY OF oDlgSearch ;
ALIAS "Test" ;
ITEMFIELD "VNO" ;
LISTFIELD "NAME"
REDEFINE BUTTON ID PBSEARCHOK OF oDlgSearch ACTION
oDlgSearch:END()
ACTIVATE DIALOG oDlgSearch
msginfo (nvno)
return
PROCEDURE Cret_Table
LOCAL aDbf := { { "VNO" , "N", 5, 0 },;
{ "NAME" , "C", 40, 0 }}
DBCREATE ('test', aDbf)
RETURN
----------------End Prg--------------------
------------------Rc-----------------------
#define PBSEARCHOK 10121
#define CBDIARY 10122
Search DIALOG 18, 25, 266, 190
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU |
WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CAPTION "Search Name"
FONT 8, "MS Sans Serif"
{
COMBOBOX CBDIARY, 20, 19, 227, 143, CBS_DROPDOWNLIST |
WS_TABSTOP
PUSHBUTTON "&Ok", PBSEARCHOK, 109, 170, 50, 14
}
------------------End Rc-------------------
DBCOMBO class problem ?
-
- Posts: 115
- Joined: Mon Oct 17, 2005 4:42 am
- Location: India
Return to “FiveWin for Harbour/xHarbour”
Jump to
- English Forums
- ↳ FiveWin for CA-Clipper
- ↳ FiveWin for Harbour/xHarbour
- ↳ FiveTouch
- ↳ EasyReport, EasyDialog and EasyPreview
- ↳ FiveMac / FivePhone (iPhone, iPad)
- ↳ FiveLinux / FiveDroid (Android)
- ↳ FiveWin for Pocket PC
- ↳ mod_harbour
- Foros en Español
- ↳ FiveWin para CA-Clipper
- ↳ FiveWin para Harbour/xHarbour
- ↳ FiveTouch
- ↳ EasyReport, EasyDialog y EasyPreview
- ↳ FiveMac / FivePhone (iPhone, iPad)
- ↳ FiveLinux / FiveDroid (Android)
- ↳ FiveWin para Pocket PC
- ↳ mod_harbour
- Forum italiani
- ↳ All products support
- Forum Portuguese
- ↳ All products support
- Forum German
- ↳ All products support
- General
- ↳ WhatsNew / Novedades
- ↳ Bugs report & fixes / Informe de errores y arreglos
- ↳ To do - WishList / Por hacer - Peticiones
- ↳ Utilities / Utilidades
- ↳ Off Topic / Otros temas
- Artificial Intelligence
- ↳ TensorFlow and Python examples
- ↳ TensorFlow.dll for Harbour and FWH
- ↳ latest AI news
- ↳ Building TensorFlow.dll
- ↳ AI Introduction (Harbour code and samples)