Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Format error Schema.ini withTransfertext

Format error Schema.ini withTransfertext

Scheduled Pinned Locked Moved Visual Basic
databasehelpxmlquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    P Bogerd
    wrote on last edited by
    #1

    Hi Y'all I'm trying to import a text file into my Access 2000 database using the VBA function TransferText: Dim db As DAO.Database Set db = WerkDatabase db.Execute _ "SELECT * INTO TempArtikel FROM [Text;FMT=FixedLength;HDR=No;DATABASE=" + ImportDir + ";].[artikel#asc];", _ dbFailOnError db.TableDefs.Refresh My schema.ini file is located in the same directory as the text file, and looks something like this: [artikel.asc] ColNameHeader=False Format=FixedLength MaxScanRows=0 CharacterSet=OEM ARTNAR="ARTNAR" Number Width 15 OMS1AR="OMS1AR" Char Width 30 INHDAR="INHDAR" Number Width 5 PALCAR="PALCAR" Number Width 8 Where ARTNAR is the name of the column in the target database table (TempArtikel). The problem is that ADO gives me the following error message: 3443 Can't create fixed width text file without column specification which is pretty weird, because I did specify a length (15), right? What am I doing wrong here? :confused:

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups