Getting data out of a text file and putting it in an Access DB

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Getting data out of a text file and putting it in an Access DB

    Hi All

    First of all I want to thank you all for your time and patience this
    weekend. Much appreciated.

    Secondly, I'm stuck with the following:

    1) Tab-delimited file consisting of 4 data columns (code, pic, productname,
    price) with variable record size. File size ranges from 2KB to about 9KB.

    2) Using ADO/ASP need to extract the data from this tab-delim file and
    insert it into an Access table, which consists of 6 data columns (autoid,
    code, pic, productname, price, category), which will also contain data from
    previous imports.

    For your ref, I've already put in place a query to delete all records where
    category = xx, so that the insert basically re-inserts them all again. This
    delete all and insert all method is OK.

    3) When inserting this tab-delim data also want to add an integer value to
    the 5th column (category) of this Access table, as this is data is part of
    the import system not the tab-delim file.

    Any ideas??

    Many thanks.

    Rgds

    Laphan


    Laphan Guest

  2. Similar Questions and Discussions

    1. putting transform data from field text member
      i have a scene that I want to set the transforms of the object to one's that I recorded from a startmovie handler. Ive tested the code for the...
    2. access to text file
      hello sir, Thanks in advance for the help I filter a form which is based on 3 tables then i get around 20 records.how do i open the filtered...
    3. Putting several peices of data in each cell of a datagrid
      You might want to concatenate the fields at the SQL Query level. If you really want to do the combining at the datagrid level then you could indeed...
    4. Putting the text of a field into a label
      "Ter" <ter_scotland@hotmail.com> wrote in message news:bfgcs4$e7tru$2@ID-200461.news.uni-berlin.de... I can do it on one movie now, but can't get...
    5. Access an array from a text file???
      Im trying to build an array from elements I have stored in a text file (So I can access them on multiple pages). What is the syntax for this? I...
  3. #2

    Default Re: Getting data out of a text file and putting it in an Access DB

    whilst I think it is possible to get ADO to treat a text file as a DB ( dont
    know how to do it ,mind)
    Since this sounds like the sort of this you would be running on an ad hoc
    basis rather than a centeral pasrt of the day to day site op
    I'd be tempted just to use a loop with FSO to read each line, 'split' it,
    and build /exec each insert query based on the results of the split
    Not as if your processing a massive amount of data

    "Laphan" <news@FrozenMoles.co.uk> wrote in message
    news:bitit8$hho$1@titan.btinternet.com...
    > Hi All
    >
    > First of all I want to thank you all for your time and patience this
    > weekend. Much appreciated.
    >
    > Secondly, I'm stuck with the following:
    >
    > 1) Tab-delimited file consisting of 4 data columns (code, pic,
    productname,
    > price) with variable record size. File size ranges from 2KB to about 9KB.
    >
    > 2) Using ADO/ASP need to extract the data from this tab-delim file and
    > insert it into an Access table, which consists of 6 data columns (autoid,
    > code, pic, productname, price, category), which will also contain data
    from
    > previous imports.
    >
    > For your ref, I've already put in place a query to delete all records
    where
    > category = xx, so that the insert basically re-inserts them all again.
    This
    > delete all and insert all method is OK.
    >
    > 3) When inserting this tab-delim data also want to add an integer value to
    > the 5th column (category) of this Access table, as this is data is part of
    > the import system not the tab-delim file.
    >
    > Any ideas??
    >
    > Many thanks.
    >
    > Rgds
    >
    > Laphan
    >
    >

    only me 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