Third Party software to export ADT to DBF files ?

This forum is for eXpress++ general support.
Post Reply
Message
Author
pierredaou
Posts: 26
Joined: Thu Jan 28, 2010 3:23 am

Third Party software to export ADT to DBF files ?

#1 Post by pierredaou »

Hi again,

To your knowledge, is there any third party software - command-line -capable of converting /exporting ADT ( Advantage ) files into DBF's ?

Regards

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Third Party software to export ADT to DBF files ?

#2 Post by rdonnay »

I doubt that you will find anything that is command-line based, but you can probably do this with the Advantage Architect. You may even be able to use SQL commands. Are you familiar with Advantage SQL?
The eXpress train is coming - and it has more cars.

pierredaou
Posts: 26
Joined: Thu Jan 28, 2010 3:23 am

Re: Third Party software to export ADT to DBF files ?

#3 Post by pierredaou »

Absolutely, I already use Advantage Database. Arc32 do not allow command line (at least no documentation exists for this specific option), and even the SQL script cannot be launched automatically. You should go into ARC32 and then call the file to run the script. I found something called ABC AMBER ADVANTAGE, but I do not know whether it is efficient or not, and no support is available.

Thanks Anyway.

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Third Party software to export ADT to DBF files ?

#4 Post by rdonnay »

Code: Select all

/*

This program is used to run a *.SQL file.

It does NOT require ADSDBE

It can connect to a Data Dictionary or a directory of tables.

*/

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL i, cParam, cUserName, cPassword, cDataPath, cStatement, ;
      nLockingMode, nIndexMode, cServer, cSQLFile, lDeleteSQLFile, ;
      lExit, lAlways, lStatus

DEFAULT cDataPath := DC_Path(AppName(.t.)), ;
        cServer := cDataPath, ;
        nLockingMode := 1, ;
        nIndexMode := 2, ;
        lDeleteSQLFile := .f., ;
        lExit := .f., ;
        lAlways := .f.

FOR i := 1 TO PCount()
  cParam := PValue(i)
  IF !Empty(cParam)
    IF Upper(cParam) = '/SRV:'
      cServer := SubStr(cParam,6)
    ELSEIF Upper(cParam) = '/USR:'
      cUserName := SubStr(cParam,6)
    ELSEIF Upper(cParam) = '/PWD:'
      cPassword := Substr(cParam,6)
    ELSEIF Upper(cParam) = '/PATH:'
      cDataPath := Substr(cParam,7)
    ELSEIF Upper(cParam) = '/LOCK:'
      nLockingMode := Val(Substr(cParam,7))
    ELSEIF Upper(cParam) = '/INDEX:'
      nIndexMode := Val(Substr(cParam,8))
    ELSEIF Upper(cParam) = '/SQL:'
      cSqlFile := Substr(cParam,6)
    ELSEIF Upper(cParam) = '/DEL'
      lDeleteSqlFile := .t.
    ELSEIF Upper(cParam) = '/EXIT'
      lExit := .t.
    ELSEIF Upper(cParam) = '/ALWAYS'
      lAlways := .t.
    ELSEIF '/?' $ cParam .OR. '/H' $ Upper(cParam)
      ShowOptions()
    ELSEIF cParam = '/'
      DC_WinAlert('Unknown command line parameter: ' + cParam)
    ENDIF
  ENDIF
NEXT

IF PCount() == 0
  ShowOptions()
  QUIT
ENDIF

IF !Empty(cSqlFile) .AND. FExists(cSqlFile)
  cStatement := MemoRead(cSqlFile)
ENDIF

lStatus := DC_AdsSqlQuery( cServer, cUserName, cPassword, cDataPath, , ;
                           nIndexMode, nLockingMode,, cStatement, lExit, lAlways )

IF (Valtype(lStatus) == 'L' .AND. lStatus) .OR. lAlways
  IF lDeleteSqlFile .AND. !Empty(cSqlFile)
    FErase(cSqlFile)
  ENDIF
ENDIF

RETURN nil

* --------------

PROC appsys ; RETURN

* --------------

STATIC FUNCTION ShowOptions()

DC_MsgBox({'Command line Options:', ;
           '', ;
           '/srv:<server> - Set dictionary (.add) name or Drive Letter', ;
           '/usr:<user> - Set user name', ;
           '/pwd:<pwd> - Set password', ;
           '/path:<path> - Set Data Path', ;
           '/lock:<locking mode> - 0=Compatible, 1=Proprietary (default)', ;
           '/index:<index mode> - 1=NTX, 2=CDX (default)', ;
           '/sql:<sql file> - SQL to Run', ;
           '/del - Delete the SQL File after Executing Statement', ;
           '/exit - Exit program after Executing Statement', ;
           ''}, ;
           ,,,,,,,,,,,'8.Courier')

RETURN nil
The eXpress train is coming - and it has more cars.

Post Reply