xbrdbu : new version

Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

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
desdesummer87
Posts: 18
Joined: Thu May 19, 2011 4:50 pm

Re: xbrdbu : new version

Post by desdesummer87 »

desdesummer87 is only a nick
desdesummer87
Posts: 18
Joined: Thu May 19, 2011 4:50 pm

Re: xbrdbu : new version

Post by desdesummer87 »

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 _)

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

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

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

//----------------------------------------------------------------------------//
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

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
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: xbrdbu : new version

Post by Antonio Linares »

Frank,

I have placed a copy of your new XbrDbu build in FiveWin contributions :-)
https://code.google.com/p/fivewin-contr ... P&can=2&q=

thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: xbrdbu : new version

Post by driessen »

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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
jllinas
Posts: 189
Joined: Fri Oct 14, 2005 12:33 am
Location: Santo Domingo, Dominican Republic
Contact:

Re: xbrdbu : new version

Post by jllinas »

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
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: xbrdbu : new version

Post by cnavarro »

Code: Select all

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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

Line 303 ,310 , 317 :

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

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

Frank
test
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

xbrdbu : new version

Post by Franklin Demont »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: xbrdbu : new version

Post by cnavarro »

Code: Select all

   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
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: xbrdbu : new version

Post by Franklin Demont »

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: Select all

   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
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrdbu : new version

Post by Silvio.Falconi »

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 )
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply