Page 1 of 1

Workarea not in use

Posted: Tue Jan 22, 2008 11:18 am
by Ehab Samir Aziz
I am facing that error with the last combobox (v_go_cocmbo) though that program working properly in old times . I am now 7.01 version.


Error description: Error DBCMD/2001 Workarea not in use: DBSETFILTER

Stack Calls
===========
Called from: => DBSETFILTER(0)
Called from: sitex.prg => RESET(5100)

Code: Select all


static function editcust( oLbx, lAppend )
*-------------------------------------------
local oDlg
LOCAL oCbx
LOCAL oCbx2
LOCAL oCbx3
Local oGet
Local oGet2
Local oGet3
local h:=0
local V_CU_ACCT:=space(10)
local V_CU_NAME:=space(50)
local V_cu_gove:=space(30)
local V_cu_city:=space(30)
local V_cu_coun:=space(30)
local V_cu_stre:=space(50)
local V_CU_phon:=space(30)
local V_CU_fax :=space(22)
local V_CU_mobi:=space(26)
local V_CU_MAN :=space(40)
local V_CU_appr:=space(8)
local v_co_cocmbo:=""
local v_ci_cocmbo:=""
local v_go_cocmbo:=""
local a_Fields[1]
local a_Vars[1]
local lSave := .f.
local nOldRec := RecNo()
local bFilter := ""
local cFilter := ""
local aItems:={}

select 1
use cust
INDEX ON (cust->cu_acct) TO cust
INDEX ON upper(cust->cu_name) TO cust1
INDEX ON upper(cust->cu_coun) TO cust2
INDEX ON upper(cust->cu_city) TO cust3
INDEX ON upper(cust->cu_gove) TO cust4
INDEX ON upper(cust->cu_stre) TO cust5
INDEX ON upper(cust->cu_phon) TO cust6
INDEX ON upper(cust->cu_fax ) TO cust7
INDEX ON upper(cust->cu_mobi) TO cust8
INDEX ON upper(cust->cu_man ) TO cust9
INDEX ON upper(cust->cu_appr) TO cust10
set INDEX TO cust

   DEFAULT lAppend := .f.

if lAppend
   GOTO BOTTOM
   SKIP
else
   goto nOldRec
   V_CU_ACCT:=cust->CU_ACCT
   V_CU_NAME:=cust->CU_NAME
   V_cu_coun:=cust->CU_coun
   V_cu_city:=cust->CU_city
   V_cu_gove:=cust->CU_gove
   V_CU_stre:=cust->CU_stre
   V_CU_phon:=cust->CU_phon
   V_CU_fax:=cust->CU_fax
   V_CU_MAN:=cust->CU_MAN
   V_CU_mobi:=cust->CU_mobi
   V_CU_appr:=cust->CU_appr
endif





DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ;
TITLE If( lAppend, "New Customer", "Customer Update" )


   @ 1,2 SAY "&Account No." OF oDlg PIXEL 
   @ 1,50 SAY ":" OF oDlg PIXEL 
   @ 1,60 GET V_CU_ACCT OF oDlg PIXEL 

   @ 15,1 SAY "&Name" OF oDlg PIXEL
   @ 15,50 SAY ":" OF oDlg PIXEL
   @ 15,60 GET V_CU_NAME OF oDlg PIXEL

   @ 30,2 SAY "&Street" OF oDlg PIXEL
   @ 30,50 SAY ":" OF oDlg PIXEL
   @ 30,60 GET V_cu_stre OF oDlg PIXEL

  @ 45,2 SAY "&Country" OF oDlg PIXEL
  @ 45,50 SAY ":" OF oDlg PIXEL
  @ 45,60 GET oGet VAR V_cu_coun OF oDlg PIXEL
  @ 45,200 COMBOBOX oCbx VAR v_co_cocmbo ITEMS aBase1(1,"cust",256,"cu_coun");
  SIZE 110,80 ;
  OF oDlg PIXEL ;
 ON CHANGE ( oGet:VarPut( PADR( v_co_cocmbo, 30 ) ),; 
 oGet:Refresh(),oDlg:Refresh());
  valid ( reset( v_co_cocmbo, oCbx2, "cust","cu_city","cu_coun" ) , .t. )



  @ 60,2 SAY "&City" OF oDlg PIXEL
  @ 60,50 SAY ":" OF oDlg PIXEL
  @ 60,60 GET oGet2 VAR V_cu_city OF oDlg PIXEL
  @ 60,200 COMBOBOX oCbx2 VAR v_ci_cocmbo ITEMS aItems size 110,80 ;
  OF oDlg PIXEL;
 ON CHANGE ( oGet2:VarPut( PADR( v_ci_cocmbo, 30 ) ),; 
 oGet2:Refresh(),oDlg:Refresh());
  VALID (reset( v_ci_cocmbo, oCbx3, "cust","cu_gove","cu_city" ), .t.)

  @ 75,2 SAY "&Governer" OF oDlg PIXEL
  @ 75,50 SAY ":" OF oDlg PIXEL
  @ 75,60 GET oGet3 VAR V_cu_gove OF oDlg PIXEL
  @ 75,200 COMBOBOX oCbx3 VAR v_go_cocmbo ITEMS aItems  size 110,80 ;
     OF oDlg PIXEL;
 ON CHANGE ( oGet3:VarPut( PADR( v_go_cocmbo, 30 ) ),; 
 oGet3:Refresh(),oDlg:Refresh())

   @ 95,2 SAY "&Phone" OF oDlg PIXEL
   @ 95,50 SAY ":" OF oDlg PIXEL
   @ 95,60 GET V_CU_phon OF oDlg PIXEL

   @ 115,2 SAY "&Fax" OF oDlg PIXEL
   @ 115,50 SAY ":" OF oDlg PIXEL
   @ 115,60 GET V_CU_fax OF oDlg PIXEL

   @ 130,2 SAY "Man" OF oDlg PIXEL
   @ 130,50 SAY ":" OF oDlg PIXEL
   @ 130,60 GET V_CU_MAN OF oDlg PIXEL

   @ 145,2 SAY "Mobile" OF oDlg PIXEL
   @ 145,50 SAY ":" OF oDlg PIXEL
   @ 145,60 GET V_CU_mobi OF oDlg PIXEL

   @ 160,2 SAY "Account Appr." OF oDlg PIXEL
   @ 160,50 SAY ":" OF oDlg PIXEL
   @ 160,60 GET V_CU_appr OF oDlg PIXEL


   @ 280,  9 BUTTON "&Save"  OF oDlg PIXEL SIZE 50, 12 ACTION ( lSave := .t. , oDlg:End() )
   @ 280, 280 BUTTON "&Cancel" OF oDlg PIXEL SIZE 50, 12 ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

   if lSave .and. !empty( V_CU_ACCT )

      if lAppend
         select 1
         use cust
         set index to cust
         APPEND BLANK
      else
         select 1
         use cust
         set index to cust
         GOTO nOldRec
      endif

cust->CU_ACCT :=V_CU_ACCT
cust->CU_NAME :=V_CU_NAME
cust->cu_coun :=V_cu_coun
cust->cu_city :=V_cu_city
cust->cu_gove :=V_cu_gove
cust->cu_stre :=V_cu_stre
cust->CU_phon :=V_CU_phon
cust->CU_fax  :=V_CU_fax
cust->CU_MAN  :=V_CU_MAN
cust->CU_mobi :=V_CU_mobi
cust->CU_appr :=V_CU_appr

      oLbx:Refresh()          // We want the ListBox to be repainted

   else


      if Empty( V_CU_ACCT ) .and. lSave
         MsgAlert( "Please write an contract account number " )
      endif

      select 1
      use cust
      set index to cust
      oLbx:Refresh()          // We want the ListBox to be repainted

      GOTO nOldRec

   endif

      select 1
      use cust
      set index to cust
      oLbx:Refresh()          // We want the ListBox to be repainted

      GOTO nOldRec

return nil


function reset( cItem,oCbx,cFile,fld_na,filter_name)
//---------------------------------------------------
  local aItems:={}
  local nArea:= select()
  local y:=0


  use (cFile) new
/*line 5100*/  set filter to cItem = &(filter_name)

  go top

  aAdd(aItems,space(256)) //Put First element empty

  do while ! eof()

     y:=ASCAN(aItems,(cFile)->&fld_na)
     if y==0
        aAdd(aItems,(cFile)->&fld_na)
        dbSkip()
        else
        dbSkip()
     endif

  ENDDO

  *use
  *set index to 
  select( nArea )
  oCbx:setItems( aItems )
  oCbx:refresh()
return nil

Posted: Tue Jan 22, 2008 8:56 pm
by James Bott
Ehab,

First, you CANNOT index the customer file each time you edit a record. If it is a multiuser app, it will crash if anyone else has the customer file open. Even if it isn't multiuser, it will take too long to build the indexes each time the user edits. You build the indexes once, then just reopen them. You only have to reindex if there is a corrupted index.

Since you already have TData, why aren't you using it? You could eliminate about half the code you have written. Code like this:

local V_CU_ACCT:=space(10)
local V_CU_NAME:=space(50)
local V_cu_gove:=space(30)
local V_cu_city:=space(30)
local V_cu_coun:=space(30)
local V_cu_stre:=space(50)
local V_CU_phon:=space(30)
local V_CU_fax :=space(22)
local V_CU_mobi:=space(26)
local V_CU_MAN :=space(40)
local V_CU_appr:=space(8)

Becomes:

oCustomer:blank()

Code like this:

goto nOldRec
V_CU_ACCT:=cust->CU_ACCT
V_CU_NAME:=cust->CU_NAME
V_cu_coun:=cust->CU_coun
V_cu_city:=cust->CU_city
V_cu_gove:=cust->CU_gove
V_CU_stre:=cust->CU_stre
V_CU_phon:=cust->CU_phon
V_CU_fax:=cust->CU_fax
V_CU_MAN:=cust->CU_MAN
V_CU_mobi:=cust->CU_mobi
V_CU_appr:=cust->CU_appr

You don't need at all, since TData has a built-in buffer. oCustomer:cu_acct is a buffer so it can be edited without affecting the actual database file ( until you do oCustomer:save() ).

If you are building a new app, I suggest changing your fieldnames. The leading CU_ is not needed, especially if you are going to use TData. The one exception to this is for the ID number. You may need to have multiple ID numbers in the same record like for an invoice which would have an invno and custno.

First I recommend building a TXData class and saving it as a separate PRG; txdata.prg. We are just going to create a new add() method that will be used in TCustomer and any other database class you create.

Code: Select all

//---------------------------------------------------------------------------//

class TXData from TData
   method add()
endclass

//---------------------------------------------------------------------------//

method add() CLASS TXData
   ::lAdd:=.t.
   ::blank()
   ::edit()
   ::lAdd:=.f.
   ::load() // in case they cancel, this reloads the buffer
return self

//---------------------------------------------------------------------------//
Now create a customer class. We just need three methods, new(), edit() and browser(). In the browser method you can create buttons for New, Edit, Delete and call the add(), edit(), and delete() methods of the TCustomer class. Look how much less code there is.

Note that TCustomer is a table. In the edit method we create a single customer record object using TRecord. This is needed for one primary reason and that is because if the browse is repainted the TCustomer buffer gets reloaded and we don't want that.

Also note that the TRecord class is smart. If you are adding a new customer it will append a new record when you save it. If you are editing an existing customer it will save the data back to the original record. This is the power of inheritance. The code is written once in TRecord so you don't have to keep rewriting it for each subclass you create.

Save the customer class in another PRG.

Code: Select all

//---------------------------------------------------------------------------//

class TCustomer from TXData
   method new
   method edit
   method browser
endclass

method new() CLASS TCustomer
   super():new(,"cust")
   ::addindex("cust")
   ::addindex("cust1")
   ::addindex("cust2")
   ...
   ::setOrder(1)
   ::gotop()
return self

//---------------------------------------------------------------------------//

method edit() CLASS TCustomer
   local oDlg,oCust
   
   oCust:= TRecord():new(self) 
   
   define dialog oDlg title if(::lAdd,"New Customer", oCust:name)
   redefine get oCust:custno ID 101 of oDlg update
   redefine get oCust:name ID 102 of oDlg update
   ...
   redefine button ID_OK of oDlg action (oCust:save(), oDlg:end())
   ...
   activate dialog oDlg
   
return self

//---------------------------------------------------------------------------//

method browser() CLASS TCustomer
   // define the browse here...
return self

//---------------------------------------------------------------------------//
This is so much simpler and easier to read.

Regards,
James

Posted: Tue Jan 29, 2008 10:13 pm
by Ehab Samir Aziz
I have something wrong related with the refresh of the browse. Is that related to xBrowse or for the code ?
Can I separate the main menu in separate tmain.prg for the main menu and xdata.prg for the class txdata and the tcust.prg for customer database modules (add,edit,delete).
Thanks
How can I connect the three .prg ?

Code: Select all

#include "fivewin.ch"
#include "xbrowse.ch"



function main()
*--------------------------

    local oWnd,oBar

    field cu_acct, cu_name

    set date format to "DD/MM/YYYY"
    set deleted on
    set resources to "test04.dll"
    setHandleCount(99)
     
    *use cust exclusive
    *recall all
    *index on cu_acct to cust1
    *index on upper(cu_name) to cust2
    *use 
    
    define window oWnd title "Sites Informations" MDI menu buildmenu(oWnd)

    define buttonbar oBar of oWnd size 26,28 3d
    
    define button of oBar resource "people" noborder;
    action TCustomer():new():browser()

    activate window oWnd

    set resources to
    close databases

return nil






//--- Cust class
class TCustomer from TXData
*--------------------------
   method new
   method browser
   method edit(Brw)
   message delete method _delete
   method Append_reuse
 *Hidden:
   data lAdd as logical
endclass



method new() CLASS TCustomer
*-----------------------------
   super:new(,"cust")
   if ::use()
     if ! file("cust1.ntx")
      ::createIndex("cust1",,"(cu_acct)")
      ::closeIndex()
     endif
     if ! file("cust2.ntx")
      ::createIndex("cust2",,"upper(cu_name)")
      ::closeIndex()
     endif
      ::addIndex("cust1")
      ::addIndex("cust2")
      ::setOrder(1)
      ::gotop()
   endif
   ::lAdd:=.f.
return self

//---------------------------------------------------------------------------//


method browser() CLASS TCustomer
*-------------------------------------
   local oDlg,oBrw,ocust,oFont,oCol,nFor,oChild

   ::setOrder(1)
   ::gotop()


   define font oFont name "Ms Sans Serif" size 0,-14 BOLD

   DEFINE DIALOG oDlg FROM 0,0 TO 45,128 TITLE "Customer Browse "

   oBrw := TXBrowse():New( oDlg )
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLCELL
   oBrw:nColDividerStyle    := LINESTYLE_BLACK
   oBrw:nRowDividerStyle    := LINESTYLE_BLACK
   oBrw:lColDividerComplete := .t.
   oBrw:nHeaderLines        := 1
   oBrw:nFooterLines        := 1
   oBrw:nDataLines          := 1
   oBrw:lFooter             := .t.
   oBrw:CreateFromCode()
   oBrw:nTop = 0
   oBrw:nLeft = 0
   oBrw:nWidth = 1000
   oBrw:nHeight =600
   oBrw:SetRDD()
   oBrw:refresh()
   


      for nFor := 1 to ::Fcount()
      	oBrw:aCols[ nFor ]:oDataFont := oFont
      next
    
   // Setup for using database class
   oBrw:cAlias:= ::cAlias
   oBrw:bSkip:= {|nRecs| ::skipper( nRecs ) }
   oBrw:bGotop:= {|| ::gotop() }
   oBrw:bGoBottom:= {|| ::goBottom() }
   oBrw:bBookMark := {| n | iif( n == nil, ::RecNo() , ::Goto( n ) ) }
   

oCust:= self

ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ), BuildButtons( oCust,oBrw,oDlg),oBrw:Refresh(.t.), oDlg:Refresh(.t.)) 
RETURN nil

method edit(oBrw) CLASS TCustomer
*---------------------------------
   local oDlg,oBtnNew
   local oCust:= TRecord():new( self )
   if ::lAdd
      oCust:blank()
   endif


   DEFINE DIALOG oDlg FROM 8, 2 TO 600, 700 PIXEL ;
      TITLE if(::lAdd,"Untitled","Update")


   @ 1,2 SAY "&ID" OF oDlg PIXEL
   @ 1,50 SAY ":" OF oDlg PIXEL
   @ 1,60 GET oCust:cu_acct OF oDlg PIXEL UPDATE

   @ 15,1 SAY "&Name" OF oDlg PIXEL
   @ 15,50 SAY ":" OF oDlg PIXEL
   @ 15,60 GET oCust:cu_name OF oDlg PIXEL UPDATE


   @ 280, 10 BUTTON oBtnNew PROMPT "&Save" OF oDlg PIXEL SIZE 30, 12 ;
      ACTION  ( oCust:save(), oDlg:end() ,oBrw:refresh())

   @ 280, 150 BUTTON oBtnNew PROMPT "&Cancel" OF oDlg PIXEL SIZE 30, 12 ;
      ACTION  ( oDlg:end() )

   ACTIVATE DIALOG oDlg CENTERED ;
         ON INIT ( oDlg:Update() ,oBrw:refresh() )

oCust:end()
oDlg:update()

return self



//---------------------------------------------------------------------------//

method _delete(oBrw,oCust) CLASS TCustomer
*----------------------------------------
   if msgYesNo("Delete this record?") 
      super:delete() 
      oCust:blank()
      oCust:save()
   endif 
   ::skip(1)    
   ::skip(0)    
if oBrw:eof()
   ::skip(-1)    
   ::skip(0)    
endif
oBrw:refresh()    
   

return self

//---------------------------------------------------------------------------//

METHOD Append_reuse() CLASS TCustomer
*-------------------------------
   local nOrder:= ::setOrder(1)
   local lDeleted:= set(_SET_DELETED,.F.)
   ::lBuffer:=.f.
   if ::seek( replicate(" ",len(::fieldGet(1))))
      if ::recLock()
         ::recall()
         ::unlock()
      endif
      ::lBuffer:=.t.
   else
      ::lBuffer:=.t.
      super:append()
   endif
   ::setOrder(nOrder)
   set(_SET_DELETED,lDeleted)
return self

//---------------------------------------------------------------------------//







function BuildMenu(oWnd)
*-------------------
   local oMenu
MENU oMenu
MENUITEM "&Accounts"
   MENU
         menuitem "&Accounts Control" message "Meter Read of aCustomer's machine" ACTION TCustomer():new():browser()
         menuitem "C&ontracts" message "Initial Data of aCustomer" //ACTION listcont()
         menuitem "Sites" message "Meter Read of aCustomer's machine"
         MENU
            menuitem "&Sites Control" message "Meter Read of aCustomer's machine" //ACTION  listsite()
            menuitem "SoftWare" message "Meter Read of aCustomer's machine"
            menuitem "HardWare" message "Meter Read of aCustomer's machine"
         ENDMENU


   menuitem "&Machines" message "Initial Data of aCustomer"
        MENU
          menuitem "&Machines Control" message "Meter Read of aCustomer's machine" //ACTION listmach()
          menuitem "&Meter Reader" message "Meter Read of aCustomer's machine" //Action TCust():new():browser()
          menuitem "&Spare Parts" message "Meter Read of aCustomer's machine" //ACTION machines()
          menuitem "&Paper Orders" message "Meter Read of aCustomer's machine" //ACTION machines()
          menuitem "&Paper Stock" message "Meter Read of aCustomer's machine" //ACTION machines()
        ENDMENU

   menuitem "&Operators" message "Initial Data of aCustomer"
      MENU
        menuitem "Operators Control" message "Meter Read of aCustomer's machine" //ACTION listoper()
        menuitem "Expenses" message "Meter Read of aCustomer's machine"
        menuitem "Over Time" message "Meter Read of aCustomer's machine"
        menuitem "Transportation Details" message "Meter Read of aCustomer's machine"
        menuitem "HoliDays" message "Meter Read of aCustomer's machine"
        menuitem "Phone Book" message "Meter Read of aCustomer's machine"
        menuitem "Phone Bill" message "Meter Read of aCustomer's machine"
      ENDMENU

   menuitem "E&xit" message "Contacts data of aCustomer" ACTION oWnd:end()
      ENDMENU
MENUITEM "&Tables"
      MENU
        menuitem "Country" message "Meter Read of aCustomer's machine"
        menuitem "Cities" message "Meter Read of aCustomer's machine"
        menuitem "Governers" message "Meter Read of aCustomer's machine"
        menuitem "Payment Methods" message "Meter Read of aCustomer's machine" //ACTION oper()
        menuitem "Excess Methods" message "Meter Read of aCustomer's machine" //ACTION oper()
        menuitem "Currencies" message "Meter Read of aCustomer's machine" //ACTION oper()
        menuitem "Machines Type" message "Meter Read of aCustomer's machine" //ACTION oper()
      ENDMENU


MENUITEM "&Inqueries"
MENUITEM "&Reports"
MENUITEM "&Import"
MENUITEM "&Export"
MENUITEM "&Create"
      MENU
         MENUITEM "Excel Sheet"
         MENU
                 MENUITEM "Detailed Meter Reads " //action buildexcel1(oWnd,1)
                 MENUITEM "Accounts Volumes" //action buildexcel1(oWnd,2)
                 MENUITEM "Months Volumes" //action buildexcel1(oWnd,3)
                 MENUITEM "Machines Status Sheet" //action buildexcel2(oWnd,1)
                 MENUITEM "Machines License Sheet" //action buildexcel2(oWnd,2)
                 MENUITEM "Operators Sheet" //action buildexcel3(oWnd,1)
                 
         ENDMENU

         MENUITEM "Word Document"  //ACTION WinExec( "Calendar" ) ;
         SEPARATOR
         MENUITEM "Power Point Slice"    //ACTION WinExec( "Write" ) ;
      ENDMENU
MENUITEM "&Update"
      MENU
         MENUITEM "Excel Sheet"
         MENU
                 MENUITEM "Meter Reads Sheet" //action buildexcel(oWnd,2)
         ENDMENU

         MENUITEM "Word Document"  //ACTION WinExec( "Calendar" ) ;
         SEPARATOR
         MENUITEM "Power Point Slice"    //ACTION WinExec( "Write" ) ;
      ENDMENU

MENUITEM "&Utilities"
      MENU
         MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
            MESSAGE "Calling Windows Calculator"

         MENUITEM "C&alendar..."  ACTION WinExec( "Calendar" ) ;
            MESSAGE "Calling Windows Calendar"

         SEPARATOR

         MENUITEM "&Writing..."    ACTION WinExec( "Write" ) ;
            MESSAGE "Calling Windows Write"
      ENDMENU

   ENDMENU


return oMenu


//---------------------------------------------------------------------------//


function BuildButtons(oCust, oBrw, oDlg)
*--------------------------------------------------
    @ 34,1 BUTTON "&New"    OF oDlg SIZE 60, 20 ACTION ( oCust:add(oBrw),oBrw:refresh(),oDlg:update())

    @ 34,15 BUTTON "&Modify" OF oDlg SIZE 60, 20 ACTION ( oCust:edit(oBrw),oBrw:refresh(),oDlg:update())

    @ 34,30 BUTTON "&Delete" OF oDlg  SIZE 60, 20 ACTION ( oCust:delete(oBrw,oCust))

    @ 34,45 BUTTON "&Search" OF oDlg SIZE 60, 20 //ACTION addmete( oBrw , oDlg )

    @ 34,60 BUTTON "&Print" OF oDlg SIZE 60, 20 //ACTION oDlg:Report ( "meter reads Report", .t. )

    @ 36,1 BUTTON "&Order"    OF oDlg SIZE 60, 20//ACTION ordercust(oLbx) SIZE 40, 12

    @ 36,15 BUTTON "&Filter"    OF oDlg SIZE 60, 20 ACTION ( oCust:filterreads(oBrw),oBrw:refresh(),oDlg:update())

    @ 36,30 BUTTON "&Unfilter" OF oDlg SIZE 60, 20//ACTION Nonfiltercust(oLbx) SIZE 40, 12

    @ 36,45 BUTTON "&Exit"   OF oDlg SIZE 60, 20 //ACTION oDlg:End() SIZE 40, 12


return nil


class TXData from TData
*-----------------------------
   method add  
endclass

//---------------------------------------------------------------------------//

method add()CLASS TXData
*-----------------------------
   ::lAdd:=.t.
   ::blank()
   ::edit()
   ::lAdd:=.f.
   ::load()   // in case they cancel
   ::GOTOP()
return self

 

Posted: Tue Jan 29, 2008 11:25 pm
by James Bott
Ehab,

>I have something wrong related with the refresh of the browse. Is that related to xBrowse or for the code ?

Please describe the refresh problem, including exact steps on how to recreate it.

>Can I separate the main menu in separate tmain.prg for the main menu and xdata.prg for the class txdata and the tcust.prg for customer database modules (add,edit,delete).

Yes.

>How can I connect the three .prg ?

You use a build program, a batch file, or a batch file with make files. Please search the forum for more info.

James

Posted: Sat Feb 02, 2008 11:03 pm
by Ehab Samir Aziz
This is little out of discusion . How I search for the complete string : make file .
I tried search : "make" AND "file" but I got "make" as a standalone search and "file" as a standalone search .

Posted: Sat Feb 02, 2008 11:30 pm
by Enrico Maria Giordano
Ehab Samir Aziz wrote:This is little out of discusion . How I search for the complete string : make file .
I tried search : "make" AND "file" but I got "make" as a standalone search and "file" as a standalone search .
Specify "make file" and select "Search for all terms".

EMG

Posted: Sun Feb 03, 2008 3:17 pm
by Ehab Samir Aziz
Thanks Enrico ,
I am sorry that is not work . When I search "make file" either file or make alone appeared in different color. Not the two words together beside each other.
Thanks

Posted: Sun Feb 03, 2008 4:34 pm
by Enrico Maria Giordano
Ops! You are right. It seems you can't get what you are trying to search, sorry.

EMG

Posted: Tue Feb 05, 2008 11:28 pm
by Ehab Samir Aziz
The refresh error as appeared in the image .
Please look carefully you will find duplicated records. By the way How can I increase the size of the image ?

[img][img]http://img91.imageshack.us/img91/9615/erroriz8.th.png[/img][/img]

Posted: Wed Feb 06, 2008 2:00 am
by James Bott
Ehab,

>The refresh error as appeared in the image .
>Please look carefully you will find duplicated records.

Are you sure you don't have duplicate records in the data file? If so, can you send me a copy of your prg and dbf that shows the problem?

>By the way How can I increase the size of the image ?

Use www.freeimagehosting.net and then select the link you wish (some show the thumbnail and others show the full size image.

James

Posted: Fri Feb 08, 2008 8:23 pm
by Ehab Samir Aziz
Sent to your mail the files. Thanks

Posted: Fri Feb 08, 2008 11:32 pm
by James Bott
Ehab,

Do you mean that you sent more files today?

I got your files yesterday and sent a response yesterday. Did you get it?

James

Posted: Sat Feb 09, 2008 5:40 pm
by Ehab Samir Aziz
No I did not . please forward your reply to ehab_aziz2001@yahoo.com or renme the batch files into any extension . It may be lost becuase of not delivering executable files (gmail restrictions)

Posted: Sun Feb 10, 2008 12:39 am
by James Bott
Ehab,

I resent the mail to your Yahoo account. The attachment is a zip containing two PRGs.

James