Using the GATEWAY IMPORT option at the command line, now you can automate the entire task of providing desired data formats to your end-user and/or clients. No more limit on importing (using GATEWAY IMPORT) or exporting (using GATEWAY EXPORT) numerous records into and out of R:BASE 7.6 for Windows database.

Import Format Includes:

·dBASE (*.dbf)  
·Paradox (*.db)  
·ASCII Text (*.txt, *.csv)  
·MS Excel (*.xls)  
·Lotus 1-2-3 (*.wk1)  
·HTM (*.htm, *.html)  
·QuattroPro (*.wq1)  
·XML Format (*.xml)  
·MS Access Database (*.mdb)  

You can access File Gateway module either by clicking on "Open File Gateway to Import/Export Data" icon on the Main Window Toolbar or typing GATEWAY at the R> prompt or in a command file.

In this document we'll cover GATEWAY IMPORT command at the R> prompt or in a command file.


Syntax:


gateway


type

DBF
dBASE
DB
Paradox
TXT
ASCII File, Delimiter None, Qualifier None
CSV
ASCII File, Delimiter Comma, Qualifier Double Quote
QSV
ASCII File, Delimiter Comma, Qualifier Single Quote
ISV
ASCII File, Delimiter Semicolon, Qualifier Single Quote
TAB
ASCII File, Delimiter Tab, Qualifier None
CUS
ASCII File, Delimiter and Qualifier based on DB Settings
XLS
MS Excel
WKS
Lotus 1-2-3
HTM
HTML
WKQ
QuattroPro
XML
XML Format
MDB
MS Access Database
 
 
 
filename
Name and associated extension of target file with import data


OPTION
Extended parameters supported for each file format

·SHEET_INDEX  
·SOURCE_TABLE  
·SPECIFICATION_FILE_NAME - This property is used to load a prepared specification with all pre-defined settings for importing. The import must be performed once using the graphic user interface and saved using the "Specifications.." button. The specifications will be stored in a file with the .RGW file extension.  
 
Options listed above may vary based upon selected format.



Importing Data from dBASE (*.dbf) Format:


Syntax:


GATEWAY IMPORT DBF filename.dbf {CREATE/APPEND/REPLACE} <tablename>

filename.dbf
This parameter defines the file name of target file with data as dBASE format. File extension must be dbf.

Examples:

GATEWAY IMPORT DBF D:\TEMP\FNAME.DBF CREATE AAA
GATEWAY IMPORT DBF D:\TEMP\FNAME.DBF APPEND AAA
GATEWAY IMPORT DBF D:\TEMP\FNAME.DBF REPLACE AAA

NOTES:
This option allows to import data from dBASE format using BDE Engine. For use this option, you need to have BDE 32 bit version installed on your computer.



Importing Data from Paradox (*.db) Format:


Syntax:


GATEWAY IMPORT PDX filename.db {CREATE/APPEND/REPLACE} <tablename>

filename.db
This parameter defines the file name of target file with data as Paradox format. File extension must be db.

Examples:

GATEWAY IMPORT PDX D:\TEMP\FNAME.DB CREATE AAA
GATEWAY IMPORT PDX D:\TEMP\FNAME.DB APPEND AAA
GATEWAY IMPORT PDX D:\TEMP\FNAME.DB REPLACE AAA

NOTES:
This option allows to import data from Paradox format using BDE Engine. For use this option, you need to have BDE 32 bit version installed on your computer.



Importing Data from ASCII Text (*.txt, *.csv) Format:


Syntax:


GATEWAY IMPORT TXT filename.txt {CREATE/APPEND/REPLACE} <tablename>

Code
Delimiter
Qualifier
TXT
None
None
CSV
Comma
Double Quotes
QSV
Comma
Single Quotes
ISV
Semicolon
Single Quotes
TAB
Tab
None
CUS
Database DELIMIT Setting
Database QUOTES Setting


filename.txt
This parameter defines the file name of target file with data as ASCII format.

Examples:

GATEWAY IMPORT TXT D:\TEMP\FNAME.TXT CREATE AAA
GATEWAY IMPORT TXT D:\TEMP\FNAME.TXT APPEND AAA
GATEWAY IMPORT TXT D:\TEMP\FNAME.TXT REPLACE AAA



Importing Data from MS Excel (*.xls) Format:



Syntax:

GATEWAY IMPORT XLS filename.xls {CREATE/APPEND/REPLACE} <tablename>

filename.xls
This parameter defines the file name of target file with data as MS Excel format. File extension must be xls.

OPTION

SHEET_INDEX  
Index of worksheet starting from 0.  

Examples:

GATEWAY IMPORT XLS D:\TEMP\FNAME.XLS CREATE AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT XLS D:\TEMP\FNAME.XLS APPEND AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT XLS D:\TEMP\FNAME.XLS REPLACE AAA OPTION SHEET_INDEX 0

NOTES:
Use this option to import data from MS Excel file using the MS Excel application as OLE_server.



Importing Data from Lotus 1-2-3 (*.wk1) Format:


Syntax:


GATEWAY IMPORT WKS filename.wk1 {CREATE/APPEND/REPLACE} <tablename>

filename.wk1
This parameter defines the file name of target file with data as Lotus 1-2-3 format. File extension must be wk1.

OPTION

SHEET_INDEX  
Index of worksheet starting from 0.  

Examples:

GATEWAY IMPORT WKS D:\TEMP\FNAME.WK1 CREATE AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT WKS D:\TEMP\FNAME.WK1 APPEND AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT WKS D:\TEMP\FNAME.WK1 REPLACE AAA OPTION SHEET_INDEX 0



Importing Data from HTM (*.htm, *.html) Format:


Syntax:


GATEWAY IMPORT HTML filename.htm {CREATE/APPEND/REPLACE} <tablename>

filename.htm
This parameter defines the file name of target file with data as HTML format. File extension must be htm or html.

Examples:

GATEWAY IMPORT HTM D:\TEMP\FNAME.HTM CREATE AAA
GATEWAY IMPORT HTM D:\TEMP\FNAME.HTM APPEND AAA
GATEWAY IMPORT HTM D:\TEMP\FNAME.HTM REPLACE AAA



Importing Data from QuattroPro (*.wq1) Format:



Syntax:

GATEWAY IMPORT WKQ filename.wq1 {CREATE/APPEND/REPLACE} <tablename>

filename.wq1
This parameter defines the file name of target file with data as QuattroPro format. File extension must be wq1.

OPTION

SHEET_INDEX  
Index of worksheet starting from 0.  

Examples:

GATEWAY IMPORT WKQ D:\TEMP\FNAME.WQ1 CREATE AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT WKQ D:\TEMP\FNAME.WQ1 APPEND AAA OPTION SHEET_INDEX 0
GATEWAY IMPORT WKQ D:\TEMP\FNAME.WQ1 REPLACE AAA OPTION SHEET_INDEX 0



Importing Data from XML (*.xml) Format:


Syntax:


GATEWAY IMPORT XML filename.xml {CREATE/APPEND/REPLACE} <tablename>

filename.xml
This parameter defines the file name of target file with data as XML format. File extension must be xml.

Examples:

GATEWAY IMPORT XML D:\TEMP\FNAME.XML CREATE AAA
GATEWAY IMPORT XML D:\TEMP\FNAME.XML APPEND AAA
GATEWAY IMPORT XML D:\TEMP\FNAME.XML REPLACE AAA



Importing Data from MS Access Database (*.mdb) Format:


Syntax:


GATEWAY IMPORT MDB filename.mdb {CREATE/APPEND/REPLACE} <tablename>

filename.mdb
This parameter defines the file name of target file with data as MDB format. File extension must be mdb.

OPTION

SOURCE_TABLE  
Table name in MDB file.  

Examples:

GATEWAY IMPORT MDB D:\TEMP\FNAME.MDB CREATE AAA OPTION SOURCE_TABLE TblName
GATEWAY IMPORT MDB D:\TEMP\FNAME.MDB APPEND AAA OPTION SOURCE_TABLE TblName
GATEWAY IMPORT MDB D:\TEMP\FNAME.MDB REPLACE AAA OPTION SOURCE_TABLE TblName