• no import header of text file

    Author
    Topic
    #463494

    …. into text file have the header of fileds, is possible to NO import header of each field and import from the second line of text file?

    How to modify this string:
    cnDB.Execute “INSERT INTO [StarData] ” _
    & “SELECT * FROM [Text;Database=” & strTextFolder & “].[” _
    & StarsTextFile & “]”, _
    lngImported, _
    adCmdText Or adExecuteNoRecords

    i have see in the forum existsis the option YES/NO but have difficult to arrange the code…

    i use this ini file but the header of fileds are imported into first line of table????

    Print #intFile, “[” & StarsTextFile & “]”
    Print #intFile, “MaxScanRows=1”
    Print #intFile, “Format=Delimited(;)”
    Print #intFile, “ColNameHeader=False”
    Print #intFile, “Col1=””Field1″” Text”
    Print #intFile, “Col2=””Field2″” Text”
    Print #intFile, “Col3=””Field3″” Text”
    Print #intFile, “Col4=””Field4″” Text”
    Print #intFile, “Col5=””Field5″” Text”
    Print #intFile, “Col6=””Field6″” Text”
    Print #intFile, “Col7=””Field7″” Text”

    Viewing 1 reply thread
    Author
    Replies
    • #1183396

      I don’t know if you can do it that way. See Much ADO About Text Files.

      • #1183410

        I don’t know if you can do it that way. See Much ADO About Text Files.

        RESOLVED!

        but…

        in column 7 of csv have a date in this format :2009/06/07 (yyyy/mm/dd) is possible to format the column 7 in schema ini in dd/mm/yyyy?
        Note:
        to the default i have formated all column i n text, only for experiment..

        • #1183415

          You can specify the date format to be read from the text file by including a line in the schema.ini file

          DateTimeFormat=yyyy/mm/dd

          (This line should be after the file name and before the column specifications)

          Specify Date as the data type for the date column(s).

          The date field(s) will be displayed using your system date format.

    • #1183420

      [H_-_Report_dei_Prodotti_per_Agenzia.csv]
      MaxScanRows=1
      Format=Delimited(;)
      DateTimeFormat=yyyy/mm/dd
      ColNameHeader=TRUE
      Col1=”DTR” Text

    Viewing 1 reply thread
    Reply To: no import header of text file

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: