Importing a .Dat file into a DB using Coldfusion

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Importing a .Dat file into a DB using Coldfusion

    We are currently receiving a txt file from another DB. We need to import this
    file into a Database using coldfusion. The delimiter that is used is |. The
    first row is the column header. Any help would be appreciated.



    Miller1229 Guest

  2. Similar Questions and Discussions

    1. Importing text from a XML File
      Hello I would like to import text from a XML file into a dynamic text field. The XML file contains database records. I have found that Flash...
    2. How to call a coldfusion function defined in other coldfusion file??
      inside a.cfm, it has code fragment: <cfloop> <cfinclude template="b.cfm"> </cfloop> inside b.cfm, it has code fragment: ...
    3. Importing a text file into a DB using Coldfusion
      Receiving a text file with the 1st row being the header row. I need to import this txt file into a Database using coldfusion. Any help would be...
    4. Importing Autocad File
      Hi, I am in desperate need of some help. I need to export a autocad (2004) drawing to scale into Indesign CS. Can this be done, if so how? I...
    5. Importing file
      When I import a file using the file() function it is screwing up any spanish accents and putting in some strange characters in their place. Is...
  3. #2

    Default Re: Importing a .Dat file into a DB using Coldfusion

    I have always used the CFHTTP tag to read delimited flat files and then you
    can loop the results into a query that inserts into a database. By default
    the first row is used for column names and you specify the delimiter. Works
    really well.

    .....Brad


    "Miller1229" <webforumsuser@macromedia.com> wrote in message
    news:cvdho4$6bc$1@forums.macromedia.com...
    We are currently receiving a txt file from another DB. We need to import
    this
    file into a Database using coldfusion. The delimiter that is used is |.
    The
    first row is the column header. Any help would be appreciated.




    Brad Guest

  4. #3

    Default Re: Importing a .Dat file into a DB using Coldfusion

    Using CFFILE to read the file in question is the only solution that I can think
    of. A couple of things need to be addressed first:

    1) What DB are you using (SQL Server, Oracle, Access, etc.)
    2) Does the table that is being inserted into already exist?

    If the table already exists, you will need to do some checking to see if the
    values being imported are unique. If they are, you would do an insert. If the
    value already exists, you would need to do an update (if that is what you want
    to do).

    LeadFoot Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139