If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > General Protection Error when using Data Transfer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-19-04, 09:26
pbare pbare is offline
Registered User
 
Join Date: Aug 2004
Posts: 16
General Protection Error when using Data Transfer

I am attempting to create a comma delimited file from a Paradox 7 table, but whenever I use the following code, I get a General Protection Error:

method pushButton(var eventInfo Event)
var
dt DataTransfer
endVar

dt.setSource("upload_e1.db")
dt.setDest("Upload_e123456.txt", DTAsciiVar)
dt.setDestFieldNamesFromFirst(True)

dt.setDestDelimiter("'")
dt.setDestDelimitedFields(DTDelimJustText)

dt.setDestSeparator(",")

dt.setDestCharSet(DTAnsi)

dt.TransferData()
endMethod

The line that seems to be causing the problem is dt.setDestFieldNamesFromFirst(True), but I am not sure why.

I need to have the column headings in the text file so that it can be uploaded into another program.

Any suggestions would be greatly appreciated.

Thanks,
pbare
Reply With Quote
  #2 (permalink)  
Old 10-19-04, 09:52
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
If this is a one-time requirement then you can simply export the table without writing any ObjectPAL...
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #3 (permalink)  
Old 10-19-04, 10:25
pbare pbare is offline
Registered User
 
Join Date: Aug 2004
Posts: 16
Unfortunately, it is not just a one time thing - the users require the ability to do this feature at least once a week.

pbare
Reply With Quote
  #4 (permalink)  
Old 10-27-04, 18:21
Shores Shores is offline
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
Why dont' you simply create the comma delimited file by yourself?

One scan on a tcursor on the table, containing a for cycle on the fields (or, if the table is always the same one, a field by field write on the text file) should do the trick, without relying on a function that does indeed crash your Paradox...
__________________
The only failure is not trying to do it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On