Suggestion about document archive system?

Suggestion about document archive system?

Postby Horizon » Wed Nov 26, 2014 8:03 am

Hi,

I use DBFCDX. I need to save some document file to my archive dbf.

Documents can be picture formats (tiff, bmp, jpg, etc.), pdf, docx, rtf, etc.

Can I store these files content to memo file using MemoRead and MemoWrit function? I dont need to show them programatically. I can open the file associated program using shellexecute open function.

Is it reliable?. Is there any dbf limition for memo field.? Is there any trick?

Any comments? Thanks in advance.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Suggestion about document archive system?

Postby hmpaquito » Wed Nov 26, 2014 8:39 am

Horizon,

IMHO, in the world xbase, almost nobody advised burn files on memo fields. The document systems are size monstrous. Can you imagine that the .dbf or .fpt files breaks? Tip: writes the files and directories in the .dbf file write the fullname.

By contrast, in files, fat directory grows and slows the computer. :(

regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Suggestion about document archive system?

Postby Horizon » Wed Nov 26, 2014 8:43 am

hmpaquito wrote:Horizon,

IMHO, in the world xbase, almost nobody advised burn files on memo fields. The document systems are size monstrous. Can you imagine that the .dbf or .fpt files breaks? Tip: writes the files and directories in the .dbf file write the fullname.

By contrast, in files, fat directory grows and slows the computer. :(

regards


Thanks hmpaquito.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Suggestion about document archive system?

Postby Silvio.Falconi » Wed Nov 26, 2014 11:40 am

I saw on a Italian application made with Delphi a procedure to save documents ( tiff, bmp, jpg, etc.), pdf, docx, rtf, etc )

Image

But I not Know How create it


Last year I tried to make a test but then I not resolved it

Perhaps someone can found a solution ...


test.prg
Code: Select all  Expand view  RUN


include "FiveWin.ch"
#include "constant.ch"

 #define LIGHTCYAN        nRGB( 203, 225, 252 )


STATIC oSay[6]
STATIC cNameImage,dDateModImage,nSizeImage
STATIC oRich

Function ut_allegati(cKdnr)
   Local  oDlg
   Local  oBar
   Local  nBottom   := 35
   Local  nRight    := 110
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H
   Local  oFontDlg
   Local hRichDLL  := LoadLibrary( "riched20.dll" )

   DEFINE FONT oFontDlg NAME "Tahoma"       SIZE 0, -12
   DEFINE DIALOG oDlg  SIZE nWidth, nHeight   FONT oFontDlg ;
                      STYLE nOr( WS_OVERLAPPEDWINDOW ) ;
                      TITLE "Allegati"


  oRich =      xTRich(): New(13, 0, { || "" }, oDlg, , ,,, .f.)

   oRich:cKdNr := cKdNr
   oRich:bMButtonDown  := {|nRow, nCol, nFlags| oRich:end(),oDlg:hide(),dropread(cKdnr),oDlg:show(), oDlg:end()}


    @ 120,2 SAY oSay[1] PROMPT "Nome file       :"  of oDlg SIZE 50,10
    @ 130,2 SAY oSay[2] PROMPT "Dimensioni      :"  of oDlg SIZE 50,10
    @ 160,2 SAY oSay[3] PROMPT "Ultima modifica :"  of oDlg SIZE 50,10
    @ 120,10 SAY oSay[4] PROMPT  cNameImage          of oDlg SIZE 200,10  UPDATE
    @ 130,10 SAY oSay[5] PROMPT  nSizeImage          of oDlg SIZE 50,10  UPDATE
    @ 160,10 SAY oSay[6] PROMPT  dDateModImage       of oDlg SIZE 50,10  UPDATE

 oDlg:bResized := {||Rinfresca_oFrm(nHeight,nWidth,oDlg) }

ACTIVATE DIALOG oDlg CENTERED
FreeLibrary( hRichDLL )
return nil

Function Rinfresca_oFrm(nHeight,nWidth,oDlg)

    oRich:ntop :=oDlg:nHeight-180
   oRich:nwidth :=oDlg:nwidth-20
   oRich:nHeight :=oRich:ntop-60

     oRich:refresh()
     return nil


function dropread()

return nil



class xrich

Code: Select all  Expand view  RUN
// Win32 RichEdit Control support

#include "FiveWin.ch"
#include "Constant.ch"
#include "WColors.ch"
#include "RichEdit.ch"

#ifdef __XPP__
   #define Super ::TControl
   #define New   _New
#endif

#define CTRL_CLASS        "RichEdit20A"

#define MK_MBUTTON         16


#define WM_MBUTTONDOWN    519
#define WM_MBUTTONDBLCLK  521


#define WM_MOUSEWHEEL     522
#define WM_NCHITTEST      132  // 0x84

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

CLASS xTRich FROM TRichEdit

   DATA   cCargo, cKdNr

   METHOD HandleEvent( nMsg, nWParam, nLParam )

   METHOD MButtonDown( nRow, nCol, nFlags )

ENDCLASS

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

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS xTRich
   local  nRow, nCol, nFlags
   do case

   case nMsg == WM_NCHITTEST


      if ::cCargo = GetWindowText( ::hWnd ) .or.  len(ALLTRIM(GetWindowText( ::hWnd )))=0

      else
         ::MButtonDown( nRow, nCol, nFlags )
         ::cCargo := GetWindowText( ::hWnd )

      endif
   case nMsg == FM_HIGHLIGHT
      return ::HighLightLine()

   case nMsg == FM_HIGHLIGHTALL
      return ::HighlightAllText()

   case nMsg == WM_KEYDOWN
      if ::lReadOnly
         if ( nWParam == Asc( "E" ) .or. nWParam == Asc( "L" ) .or. ;
               nWParam == Asc( "J" ) .or. nWParam == Asc( "R" ) ) .and. ;
               GetKeyState( VK_CONTROL )

            return 0
         endif
      endif

      return ::KeyDown( nWParam, nLParam )

   otherwise
      if( nMsg == WM_MOUSEWHEEL .or. nMsg == WM_MBUTTONDOWN .or. ;
         nMsg == WM_MBUTTONDBLCLK )

      if GetKeyState( VK_CONTROL )
         return 0
      endif
   else
      Super:HandleEvent( nMsg, nWParam, nLParam )
   endif
endcase

return nil

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

METHOD MButtonDown( nRow, nCol, nKeyFlags ) CLASS xTRich

   Super:MButtonDown( nRow, nCol, nKeyFlags )

   ::PostMsg( FM_CHANGE )

return nil

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



 










run the exe and then you can insert document on the dialog test draging the document you want into the box

: the document are showed on this box ... then i not found a solution to save them on folder or found another solution
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Suggestion about document archive system?

Postby Horizon » Wed Nov 26, 2014 11:57 am

Silvio,

Thank you for your interest. But I dont interested in browsing document.

I just to take comment of the method of store files.

Any other comment.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Suggestion about document archive system?

Postby Gale FORd » Wed Nov 26, 2014 3:32 pm

I created a document storage/retrieval system for our software. So far we have scanned over 500,000 documents with over 620,000 pages.
We decided to use external files and store the path and file name in a reference database.
The folder structure for the images is designed to limit the number of files per folder. We use the scan date and put them in \images\yyyy\mm\dd
We scan between 2000 and 5000 images a day.
Pro.
1. Backup only changed files.
2. File name of documents will allow us to reconstruct database if necessary.
3. No need to export document to view. Also do not need to clean up exported document after viewing.
4. Less chance of dbf/ftp corruption resulting in loss of documents.
Con.
1. Copy, delete, etc must be done with more program control because of external files.
2. Less secure.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Suggestion about document archive system?

Postby Horizon » Wed Nov 26, 2014 5:15 pm

Gale FORd wrote:I created a document storage/retrieval system for our software. So far we have scanned over 500,000 documents with over 620,000 pages.
We decided to use external files and store the path and file name in a reference database.
The folder structure for the images is designed to limit the number of files per folder. We use the scan date and put them in \images\yyyy\mm\dd
We scan between 2000 and 5000 images a day.
Pro.
1. Backup only changed files.
2. File name of documents will allow us to reconstruct database if necessary.
3. No need to export document to view. Also do not need to clean up exported document after viewing.
4. Less chance of dbf/ftp corruption resulting in loss of documents.
Con.
1. Copy, delete, etc must be done with more program control because of external files.
2. Less secure.


Thank you Gale.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 49 guests