Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    16

    Unanswered: 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

  2. #2
    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

  3. #3
    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

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •