I have written the following code in an attempt to automatically copy data from and Access table into a Paradox table:-
method pushButton(var eventInfo Event)
var
dtHandle DataTransfer ;// handle to transfer variable
tvTable TableView ;// tmp handle for displaying imported file
endVar
;// Set notification for user
setMouseShape(MOUSEWAIT, TRUE)
dtHandle.setSource "C:\\WINDOWS\\Desktop\\LittleFolder\\TestStuff\\material.mdb", dtASCIIVar)
dtHandle.setSourceCharSet(dtANSI)
;// Enable the key violation and problems tables
;//
dtHandle.setKeyViol(TRUE)
dtHandle.setProblems(TRUE)
;// We are always appending in this script since we force
;// the destination table to always exist
;//
dtHandle.setDest("MatMan.DB"
dtHandle.setAppend(TRUE)
;// Perform the import
;//
dtHandle.transferData()
;// Reset cursor for the user
;//
setMouseShape(MOUSEARROW, TRUE)
;// Display table
;//
tvTable.open("MatMan.DB"
endMethod
However, this code returns the following error - "Corrupt file - Other than header". Despite recieving this message I know that the file is not actually corrupt so am looking either for an alternative way of doing this or any suggestions as to why my code is reulsting in this error.
Thanks,
Woody.
method pushButton(var eventInfo Event)
var
dtHandle DataTransfer ;// handle to transfer variable
tvTable TableView ;// tmp handle for displaying imported file
endVar
;// Set notification for user
setMouseShape(MOUSEWAIT, TRUE)
dtHandle.setSource "C:\\WINDOWS\\Desktop\\LittleFolder\\TestStuff\\material.mdb", dtASCIIVar)
dtHandle.setSourceCharSet(dtANSI)
;// Enable the key violation and problems tables
;//
dtHandle.setKeyViol(TRUE)
dtHandle.setProblems(TRUE)
;// We are always appending in this script since we force
;// the destination table to always exist
;//
dtHandle.setDest("MatMan.DB"
dtHandle.setAppend(TRUE)
;// Perform the import
;//
dtHandle.transferData()
;// Reset cursor for the user
;//
setMouseShape(MOUSEARROW, TRUE)
;// Display table
;//
tvTable.open("MatMan.DB"
endMethod
However, this code returns the following error - "Corrupt file - Other than header". Despite recieving this message I know that the file is not actually corrupt so am looking either for an alternative way of doing this or any suggestions as to why my code is reulsting in this error.
Thanks,
Woody.