FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrdbu : new version
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Mon Feb 18, 2013 06:56 PM
desdesummer87 wrote:Si. Ese es el problema que procuraré solventar del mejor modo posible.. Gracias de nuevo por su dedicación.
=====================================================================
If. That one is the problem that I will try to solve as good as possible.. Thanks again for its dedication.



If your name points to clipper Summer 87 , me too is still active from these days.

Frank
test
Posts: 18
Joined: Thu May 19, 2011 04:50 PM
Re: xbrdbu : new version
Posted: Tue Feb 19, 2013 09:59 AM

desdesummer87 is only a nick

Posts: 18
Joined: Thu May 19, 2011 04:50 PM
Re: xbrdbu : new version
Posted: Fri Feb 22, 2013 06:07 PM

Saludos.

He conseguido evitar el error que se producia al modificar la estructura
de una base de datos con campos Memo.
( La extension "XXXX.DBT" no era renombrada al salvar los cambios)

Para ello ha sido necesario modificar las funciones afectadas tal como
indico más abajo

Confío en que esté usted de acuerdo con los cambios.

desdesummer87.

==============================================================================

Greetings.

I have managed to avoid the error that took place when modifying the structure
Of a data base with fields Silly.
(the extension XXXX.DBT was not renamed when saving changes)

For it it has been necessary to modify the affected functions same as
I indicate further down

I trust that you agree upon the changes.

Desdesummer87.

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

Func TempFile(cExtension,cPath)
Local cFile
default cPath:=""
cExtension:= StrTran(cExtension,".","")
While .T.
cFile:="AAA" +"." + upper(cExtension)
cFile:= cPath + cFile
If .NOT. file( cFile )
Exit
End
End

Return cPath + cFile

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

Static Func BuildDbf( cDbfName, oLbx )

Local aFields := {}
Local n
Local cTempFile:=""

If Empty( cDbfName )
MsgAlert( "Se necesita un nombre para la DBF", "" )
Return Nil
End

If Len( oLbx:aItems ) == 0
MsgAlert( "No se han definido campos", "" )
Return Nil
End

If At( ".", cDbfName ) == 0
cDbfName += ".dbf"
End

For n = 1 to Len( oLbx:aItems )
AAdd( aFields, _FieldInfo( AllTrim( oLbx:aItems[ n ] ) ) )
Next

If File( cDbfName )
If MsgYesNo( "DBF existente. ¿ Modificar estructura...?", "" )
cTempFile:= tempFile("dbf")
DbCreate( cTempFile, aFields )
Use (cTempFile)
Append from (cDbfName)
Use
Ferase( cDbfName )
Rename ( cTempFile ) to (cDbfName)
If file( cFileNoExt( cTempFile ) +".dbt" )
nLen := Len(cDbfName)
nLong := (nLen - 4)
cNomb := SubStr(cDbfName, 1 ,nLong)
cBase := (cNomb + ".dbt")
FErase(cBase)
Rename ("AAA.dbt") To (cBase)
End
Return nil
End
End

DbCreate( cDbfName, aFields )
MsgInfo( "DBF creada", "" )

Return Nil

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

Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Sat Feb 23, 2013 06:49 PM

I provided only support for FTP-files see also (init) procedure prginit :

RDDSetDefault( 'DBFCDX' )
set(_SET_MFILEEXT,".fpt")

Allowing also dbt format would require a configuration procedure to install the used dbf driver.

Frank

test
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Sat Mar 30, 2013 11:22 AM
30/03/2013

Exe-file generated with FWH1303 , HB 3.2 (28/2/2013)
Working with xbrdbu , some errors were corrected , some modules improved

File menu

Open recent files : added to file menu , saved in xbrdbu.ini

Configuration : Dbfdriver (dbfcdx , dbfntx) , open shared , Dateformat , autopen
extension dbt should be recognised in routines as modify structure
Saved in xbrdbu.ini

Map network drive , disconnect drive

Frank Demont


http://rapidshare.com/files/2255720945/XBRDBUFD3.ZIP
test
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xbrdbu : new version
Posted: Sat Mar 30, 2013 02:29 PM
Frank,

I have placed a copy of your new XbrDbu build in FiveWin contributions :-)
https://code.google.com/p/fivewin-contributions/downloads/detail?name=XBRDBUFD3.ZIP&can=2&q=

thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: xbrdbu : new version
Posted: Sat Mar 30, 2013 09:04 PM

Antonio,
Frank,

Fantastic job done. It's really a great utility.

One small remark : to my opinion the correct key is not always shown. If you select "Natural order", the last index used is displayed in the status bar.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 189
Joined: Fri Oct 14, 2005 12:33 AM
Re: xbrdbu : new version
Posted: Sat Mar 30, 2013 11:53 PM

Frank,

Very usefull and nice utility. Exactly what I was waiting for. I just want to make a small suggestion (request?):

in "PROC OpenMyIndex()" would be a great idea to use ".cdx" or ".ntx" according with default RDD (CDX or NTX) chose in preferences. Some of our customers use NTX and others CDX.

Thanks in advance,

Julio Llinás
Visita mi Blog en http://mangucybernetico.blogspot.com/
xHarbour 1.1.0 + FWH810 + Borland 5.5.1
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Thu Apr 04, 2013 11:28 AM
April 2013

* Index menu : added when clausule in close index , index order and filter by scope

* Closing index folowed with Change/add index gives a error. Now it is ok

* Added to Tag message : order number / total orders (only DBF Browse)
In bMsg added oMsgBar:Refresh() ('Sometimes,if you select "Natural order", the last index used is displayed in the status bar')
maybe it helps

* Open index file : Rdd from alias determinates the extension

* NEW : Dialog to open a dbf-file , input fields :
- RDD (Radio buttons DBFCDX/DBFNTX)
Depending from memo-file or index-file found in combination with autopen the rdd input field is disabled or enabled
- Shows asociated memo file (same name) (checkbox).
- Open asociated index file (same name) (checkbox). Autopen determines the default value

- DBF/ARRAY BROWSE (Radio buttons)
Very powerfull feature , each column is sort- and search column, eliminating the need from index files.
Most from menu utility's should work. Also editing , relations , index files are still updated.


Download link : http://rapidshare.com/files/80261082/XBRDBUFD4.ZIP

Frank Demont
test
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: xbrdbu : new version
Posted: Thu Apr 04, 2013 09:46 PM
Application
===========
   Path and name: C:\Users\C\Downloads\XBRDBUFD4\xbrdbu.Exe (32 bits)
   Size: 3,572,224 bytes
   Compiler version: Harbour 3.2.0dev (Rev. 18881)
   FiveWin  Version: FWH 13.02
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 1 secs 
   Error occurred at: 13/04/04, 23:40:38
   Error description: Error BASE/1004  Message not found: NIL:LARRAY
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => NIL:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => NIL:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => NIL:LARRAY( 0 )
   Called from: xbrdbu.prg => (b)MAINMENU( 307 )
   Called from: .\source\classes\MENU.PRG => TMENU:INITIATE( 431 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:INITMENUPOPUP( 2580 )
   Called from:  => TMDIFRAME:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3178 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 991 )
   Called from: xbrdbu.prg => MAIN( 73 )

En la opcion Indexes sin abrir ningun fichero

In the Indexes option without opening any file

Regards

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Fri Apr 05, 2013 07:08 AM

Line 303 ,310 , 317 :

WHEN ! Empty(alias()) .AND. (Alias())->(OrdCount())>0 .AND. ! oDbfWnd:lArray;

We have to test first on empty(alias()) !

Frank

test
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
xbrdbu : new version
Posted: Tue May 14, 2013 11:03 AM

I uploaded a new version : http://rapidshare.com/files/2132244470/XBRDBUFD5.ZIP

5/4/2013

  • Open dialog : added checkbox shared

  • file2Brow , open : added parameter lDefault
    Open dialog is only used when this parameter is .F.
    Starting the aplication with default dbf's (start parameters or AALIAS section in (x)ini-file),
    will not show the open dialog ! Default values will be used !

1/5/2013 : XBRDBUFD5.ZIP

  • Preferences dialog (configuration)

    • Added : Checkbox "Open dbf with default's (no dialog)"
      If not checked, opening a dbf opens also the open dialog
    • Added : Checkbox "Load, save previous DBF configuration"
      This configuration is saved in a xbr-file , i.e. Gemeente.xbr
      containing : Filter , columns , arelations , scopes and aindex.
    • Added to (x)ini-file : [AALIAS]
      Containing the open dbf's when closing XbrDbu (Upper right corner)
      When a file window is closed , this will NOT be present
      When a list from dbf-files is specified as start parameter , this
      will overwrite the aAlias Section
  • Open dialog

    • Discarded Array Browse , new button in File window
    • Added : Checkbox "Restore previous state (... . xbr)"
      Default value from preferences
      If Checked the values from the xbr-file are loaded
      Closing the dbf will only write the status
      if in the preferences this value is .T.
    • Added : Memo say with showing some values from the xbr-file (short)
    • Added : Button : "View State" , Showing the xbr-file
  • Start parameters

    • It is possible to give more dbf's , i.e.
      XbrDbu.exe Gemeente Customer (overwrite AALIAS section in ini file)
    • One from the parameters can be a xIni-file.
      This overwrite the default one "XbrDbu.ini" in the workdir from the exe-file
    • Without parameter ,xbrdbu searches (and asks to select) in the current directory to all xIni-files.
      If none , XbrDbu.ini is used
  • Main window (oWndDbu)

    • Changed : MsgBar , shows the configuration file (ini-file)
  • File Window (Dbf) Added to BtnBar :

    • Colums : Same as utility's , Browse columns
      Column configuration. Closing the dbf will write in the xbr-file
    • Added to BtnBar : Array Browse / Dbf Browse
      Will read the dbf in a array (column recno added) and browse the array
      Pushing the button again returns to the dbf-browse
    • Filter : Same as utility's , filter OR clicking in the messagebar
    • Top Bottom Scope : Same as Indexes , Establish filter
    • Relations : Same as utility's , Relations
    • Indexes : Same as Indexes (menu)
  • File Window (Dbf) Added to MsgBar :

    • Status file , i.e. Gemeente.xbr

Frank Demont

test
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: xbrdbu : new version
Posted: Tue May 14, 2013 12:11 PM
   Error description: Error BASE/1004  No exported method: LARRAY
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LARRAY( 0 )
   Called from: xbrdbu.prg => (b)MAINMENU( 255 )
   Called from: .\source\classes\MENU.PRG => TMENU:INITIATE( 431 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:INITMENUPOPUP( 2584 )
   Called from:  => TMDIFRAME:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3182 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 995 )
   Called from: xbrdbu.prg => MAIN( 65 )

Ejecutas la aplicacion y moverte por el menu principal
Saludos

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: xbrdbu : new version
Posted: Tue May 14, 2013 02:24 PM
Line 251 must be :

WHEN ! EMPTY(alias()) .AND. OrdCount()>0 .AND. ! oDbfWnd:lArray ;

! oDbfWnd:lArray must always be the last one from the line

FRank

cnavarro wrote:
Code (fw): Select all Collapse
   Error description: Error BASE/1004  No exported method: LARRAY
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LARRAY( 0 )
   Called from: xbrdbu.prg => (b)MAINMENU( 255 )
   Called from: .\source\classes\MENU.PRG => TMENU:INITIATE( 431 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:INITMENUPOPUP( 2584 )
   Called from:  => TMDIFRAME:HANDLEEVENT( 0 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3182 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 995 )
   Called from: xbrdbu.prg => MAIN( 65 )


Ejecutas la aplicacion y moverte por el menu principal
Saludos
test
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: xbrdbu : new version
Posted: Tue May 14, 2013 03:34 PM

Application

Path and name: C:\Work\Prg\xdbu\xbrdbu.Exe (32 bits)
Size: 2,810,368 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 13.01
Windows version: 6.1, Build 7600

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 14/05/2013, 17:33:22
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 2

Stack Calls

Called from: xbrdbu.prg => FSETUP( 3898 )
Called from: xbrdbu.prg => (b)MSGSELECT( 6542 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 118 )
Called from: xbrdbu.prg => MSGSELECT( 6542 )
Called from: xbrdbu.prg => LOADPREFERENCES( 5971 )
Called from: xbrdbu.prg => MAIN( 40 )

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com