Export table to dbf file and right codepage with DoCmd.TransferText

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cuaracao
    New Member
    • Mar 2008
    • 2

    #1

    Export table to dbf file and right codepage with DoCmd.TransferText

    This is my code:

    Code1:
    Code:
    'DoCmd.OpenTable "tblImport"
    'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False
        '
    DoCmd.Close acTable, "tblImport"
    =============== =============== =============== ===========

    Code2:
    Code:
    DoCmd.TransferText acExportDelim, sImportSpecification, "sel_TblImport", strOutputDir & strDbfName & ".dbf", , , 65001
    =============== =============== =============== ===========

    In code2 i get error: "Error #3027 - Cannot update. Database or object is read-only." Everything is correct,
    -- 65001 is the unicode utf8 codepage param.
    -- sel_TblImport is a query
    -- sImportSpecific ation is specification and also set to unicode


    In code1 no errors but i can not give a proper codepage (unicode utf8), it must be utf8 otherwise the values in column in my dbf file are wrong.

    ko.ˈpɾin.θeps <------ this word must stay unicode and not converted like this:
    ko.'p?in.?eps, strange characters will be replaced with question mark.


    What should i do now, i'm stuck seriously
    Last edited by NeoPa; Mar 7 '08, 11:15 PM. Reason: Please use [CODE] tags
Working...