hi guys,
with function trovafortp() I get my recordset and then it' ok in REDEFINE BROWE oBrw. then I would like to change my search with m_g110 and press ok(ID 01) but
oBrw not change and get error.
this is my code:
and this is error:
Application
===========
Path and name: C:\MyEXE.exe (32 bits)
Size: 2,093,056 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9421)
FiveWin Version: FWHX 11.12
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 06-03-2017, 15:35:55
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: RECORDCOUNT
Args:
Stack Calls
===========
Called from: => TOLEAUTO:RECORDCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETADO( 4277 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1381 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1250 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1666 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11627 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: trovafor.prg => TROVAFOR( 40 )
....
thank for your reply.
Damiano
with function trovafortp() I get my recordset and then it' ok in REDEFINE BROWE oBrw. then I would like to change my search with m_g110 and press ok(ID 01) but
oBrw not change and get error.
this is my code:
oCn := FW_OpenAdoConnection( Connessione, .t.)
trovafortp(@oRs,@oCn,@Tuple,@lUno,@m_g110)
DEFINE FONT oFont NAME "Courier new" SIZE 0, -12
DO WHILE sw1
 Â
  if oRs <> Nil
 Â
    DEFINE DIALOG oDlg2 RESOURCE "ANAGRA" FONT oFont
      REDEFINE GET o_g110 VAR m_g110 ID 110 OF oDlg2  ;
        PICTURE "@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
   Â
      REDEFINE XBROWSE oBrw CELL LINES RECORDSET oRs ID 101 OF oDlg2
      REDEFINE BTNBMP BtnEsc ID 01 OF oDlg2       ;
        ACTION (trovafortp(@oRs,@oCn,@Tuple,@lUno,@m_g110),oBrw:Update(),  oDlg2:Refresh())      Â
     Â
      REDEFINE BTNBMP BtnEsc ID 11 OF oDlg2       ;
        ACTION (oRs:Close(), sw1 := .f., oDlg2:End())       Â
    ACTIVATE dialog oDlg2
Â
  else
    msginfo("tuple errata")
  endif
 Â
Enddo
Return Nil
function trovafortp(oRs,oCn,tuple,lUno,m_g110,oBrw)
tuple := "Select FIEDL1 as CUST, DESFIELD as DESC "+;
           "FROM FILE  "+;
           "WHERE FIELD2 >= '"+m_g110+"' "+;
           "ORDER BY DESC "
oRs := FW_OpenRecordSet( oCn, tuple, 1 )
if oRs = Nil
msginfo("ERROR")
endif
Return Niland this is error:
Application
===========
Path and name: C:\MyEXE.exe (32 bits)
Size: 2,093,056 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9421)
FiveWin Version: FWHX 11.12
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 06-03-2017, 15:35:55
Error description: Error ADODB.RecordSet/6 DISP_E_UNKNOWNNAME: RECORDCOUNT
Args:
Stack Calls
===========
Called from: => TOLEAUTO:RECORDCOUNT( 0 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETADO( 4277 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1381 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1250 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1666 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11627 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
Called from: trovafor.prg => TROVAFOR( 40 )
....
thank for your reply.
Damiano
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)