Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DXI data import

Status
Not open for further replies.

rickesilaw

Programmer
Jun 24, 2002
154
CA
Has anyone tried to extract data from the above format. It is data file for ZPAY, a payroll written in Delphi.
 
While it's likely to be a proprietary format, if it's documented somewhere, it's possible someone can help you. Does the application supply an Export capability?

Rick


 
it looks like it is MSACCESS format - if you rename the file to zpay.mdb you can load it into excel using get external data - so question would be how to read msaccess data
 
Thx Rick - one of our programmers found that as well - here is his sample code:

LOCAL lcMyFile, lnConnHandle, lnResult, lcSQLCommand, lnGetData, lcNewName
LOCAL ARRAY laWhatErr(1)

lcMyFile = GETFILE('MDB')

IF !EMPTY(lcMyFile)
lnConnHandle = ;
SQLSTRINGCONNECT('DRIVER=MICROSOFT ACCESS DRIVER (*.MDB);DBQ=' + lcMyFile)

IF lnConnHandle > 0
lnResult = SQLTABLES(lnConnHandle, 'TABLE')

IF lnResult > 0
CREATE DATABASE roypaydb
SELECT SQLResult
SCAN
*!* Build a SQL SELECT statement to pass to SQLEXEC()
lcSQLCommand = "SELECT * FROM [" + ALLTRIM(SQLResult.table_name) + "]"

lnGetData = SQLEXEC(lnConnHandle, lcSQLCommand, 'newdata')
IF lnGetData > 0
lcNewName = STRTRAN(ALLTRIM(SQLResult.table_name), " ", "_")

SELECT newdata
COPY TO (lcNewName) DATABASE roypaydb
ENDIF
ENDSCAN
ENDIF
=SQLDISCONNECT(lnConnHandle)
ELSE
=MESSAGEBOX('ODBC Connection Failed', MB_ICONEXCLAMATION, 'ODBC')
=AERROR(laWhatErr)
DISPLAY MEMORY LIKE laWhatErr
ENDIF
ENDIF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top