PC Review


Reply
Thread Tools Rate Thread

Access data import

 
 
San
Guest
Posts: n/a
 
      9th Oct 2006
Hi all

is it possible some how to import .DAT files into access? I have an old
database which stores data in .Dat files and I would like to know if it
is at all possible to some how convert and import them to access so I
don't have to retype 500 pages of data into access manuelly!!!


thanks

 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      9th Oct 2006
Try to convert the DAT file to text first. Also, Excel may be able to read
the data. Access does not directly read any data file with the DAT
extension. That extension is widely used for many different formats, so you
need to convert your orignial data into something that Access can easily
read (txt, csv, xls, dbf)
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"San" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all
>
> is it possible some how to import .DAT files into access? I have an old
> database which stores data in .Dat files and I would like to know if it
> is at all possible to some how convert and import them to access so I
> don't have to retype 500 pages of data into access manuelly!!!
>
>
> thanks
>



 
Reply With Quote
 
San
Guest
Posts: n/a
 
      9th Oct 2006
Thx

I tried that but then I still would have to do it one at the time...and
I have over 500 DAT files besides the form was all wrong when I
imported it.

So basicly there is no way I can make access load 500 files and put it
in one database so I can (add, remove and so on) like in a normal
database even though I convert the files to txt.

thanks








Arvin Meyer [MVP] skrev:
> Try to convert the DAT file to text first. Also, Excel may be able to read
> the data. Access does not directly read any data file with the DAT
> extension. That extension is widely used for many different formats, so you
> need to convert your orignial data into something that Access can easily
> read (txt, csv, xls, dbf)
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "San" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi all
> >
> > is it possible some how to import .DAT files into access? I have an old
> > database which stores data in .Dat files and I would like to know if it
> > is at all possible to some how convert and import them to access so I
> > don't have to retype 500 pages of data into access manuelly!!!
> >
> >
> > thanks
> >


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      9th Oct 2006
On 9 Oct 2006 05:34:38 -0700, "San" <(E-Mail Removed)> wrote:

>Thx
>
>I tried that but then I still would have to do it one at the time...and
>I have over 500 DAT files besides the form was all wrong when I
>imported it.
>
>So basicly there is no way I can make access load 500 files and put it
>in one database so I can (add, remove and so on) like in a normal
>database even though I convert the files to txt.


DAT is just a meaningless three letter extension, which was used
extensively in DOS to mean just any kind of data file. DAT files may
well be simple text files, or they might be highly structured or even
binary files - without inspecting the files there's no way to be sure.

If you want to be able to edit the data then you will need to actually
import it into Access tables. Linked text files (of whatever
extension) are not editable.

You can certainly use VBA code to open the files and read them into
Access tables, but how simple or complex that code would be depends on
the nature of the files.

If the data isn't confidential, perhaps you could post three or four
lines of the data, including a header if there is one? Could you also
indicate what you meant by "the form was all wrong"?

John W. Vinson[MVP]
 
Reply With Quote
 
San
Guest
Posts: n/a
 
      11th Oct 2006
Yeah sure I'll try...


uh...the dat files are actually just a few linies of text...like this

------------------------------------------------------------------------------------------------------------------
000002 ' this is the no. 2 file in
the database
Power Supply 0-40V 0-10A ' this is the product name
01 ' Type of product. No 01 is showen as "Powesupply" when the
database is run.
En justerbar strmforsyning, der kan indstilles til en sp'nding
mellem 0 og 40
volt, og til en max strm mellem 0 og 10 A.

Strmforsyningen har softstart ved power on. ' the text you don't
understand is just the product descriptions in danish





A ' this is A for analog. it can be M or D which is either mechanical
or digital but it can be all more than one.

28/1 1992 ' date ofcourse


SG ' the initials of the maker
------------------------------------------------------------------------------------------------------------------


The comments are added by me but the rest is exactly as is in the dat
file. And what i mean about the form is all wrong is that when I import
the file into access the table it also take the emty linies. and when I
try to make a form it looks funny...I think it is easier if you copy
the text and try to see for yourself.

thank for the reply

John Vinson skrev:
> On 9 Oct 2006 05:34:38 -0700, "San" <(E-Mail Removed)> wrote:
>
> >Thx
> >
> >I tried that but then I still would have to do it one at the time...and
> >I have over 500 DAT files besides the form was all wrong when I
> >imported it.
> >
> >So basicly there is no way I can make access load 500 files and put it
> >in one database so I can (add, remove and so on) like in a normal
> >database even though I convert the files to txt.

>
> DAT is just a meaningless three letter extension, which was used
> extensively in DOS to mean just any kind of data file. DAT files may
> well be simple text files, or they might be highly structured or even
> binary files - without inspecting the files there's no way to be sure.
>
> If you want to be able to edit the data then you will need to actually
> import it into Access tables. Linked text files (of whatever
> extension) are not editable.
>
> You can certainly use VBA code to open the files and read them into
> Access tables, but how simple or complex that code would be depends on
> the nature of the files.
>
> If the data isn't confidential, perhaps you could post three or four
> lines of the data, including a header if there is one? Could you also
> indicate what you meant by "the form was all wrong"?
>
> John W. Vinson[MVP]


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      11th Oct 2006
On 10 Oct 2006 22:38:55 -0700, "San" <(E-Mail Removed)> wrote:

>Yeah sure I'll try...
>
>
>uh...the dat files are actually just a few linies of text...like this
>
>------------------------------------------------------------------------------------------------------------------
>000002 ' this is the no. 2 file in
>the database
>Power Supply 0-40V 0-10A ' this is the product name
>01 ' Type of product. No 01 is showen as "Powesupply" when the
>database is run.
>En justerbar strmforsyning, der kan indstilles til en sp'nding
>mellem 0 og 40
>volt, og til en max strm mellem 0 og 10 A.
>
>Strmforsyningen har softstart ved power on. ' the text you don't
>understand is just the product descriptions in danish
>


Since each record spans more than one line, you will need some VBA
code to read the records and put the data into a table. How can you
tell when you get to a new "file" as you call it? If the description
can run to any arbitrary number of lines, you can't just count
records; what's the cue to indicate that you're now on a new item?

John W. Vinson[MVP]
 
Reply With Quote
 
San
Guest
Posts: n/a
 
      12th Oct 2006
well actually thats is just one file...I have 509 file that look
similar tol that...



John Vinson skrev:
> On 10 Oct 2006 22:38:55 -0700, "San" <(E-Mail Removed)> wrote:
>
> >Yeah sure I'll try...
> >
> >
> >uh...the dat files are actually just a few linies of text...like this
> >
> >------------------------------------------------------------------------------------------------------------------
> >000002 ' this is the no. 2 file in
> >the database
> >Power Supply 0-40V 0-10A ' this is the product name
> >01 ' Type of product. No 01 is showen as "Powesupply" when the
> >database is run.
> >En justerbar strmforsyning, der kan indstilles til en sp'nding
> >mellem 0 og 40
> >volt, og til en max strm mellem 0 og 10 A.
> >
> >Strmforsyningen har softstart ved power on. ' the text you don't
> >understand is just the product descriptions in danish
> >

>
> Since each record spans more than one line, you will need some VBA
> code to read the records and put the data into a table. How can you
> tell when you get to a new "file" as you call it? If the description
> can run to any arbitrary number of lines, you can't just count
> records; what's the cue to indicate that you're now on a new item?
>
> John W. Vinson[MVP]


 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      12th Oct 2006
On 11 Oct 2006 22:37:07 -0700, "San" <(E-Mail Removed)> wrote:

>well actually thats is just one file...I have 509 file that look
>similar tol that...


So if you look at this directory in Windows Explorer it has 509
separate .DAT files, each with these - what, three lines?

If so you'll still need some VBA code to read them in. It's a bit more
than I feel comfortable trying to write on a volunteer basis but it
shouldn't be all that hard.

John W. Vinson[MVP]
 
Reply With Quote
 
San
Guest
Posts: n/a
 
      13th Oct 2006
yeah thats what I mean 509 seperate .DAT files unfortunately....well
there are more than 3 lines there at actually 35 I think but most of
them are emty lines. ussually only about 10 or so but it varies because
of the description part.

thx anyways


John Vinson skrev:
> On 11 Oct 2006 22:37:07 -0700, "San" <(E-Mail Removed)> wrote:
>
> >well actually thats is just one file...I have 509 file that look
> >similar tol that...

>
> So if you look at this directory in Windows Explorer it has 509
> separate .DAT files, each with these - what, three lines?
>
> If so you'll still need some VBA code to read them in. It's a bit more
> than I feel comfortable trying to write on a volunteer basis but it
> shouldn't be all that hard.
>
> John W. Vinson[MVP]


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import new data and replace old data in Access table. TBui Microsoft Access External Data 4 29th May 2009 04:19 PM
Import new data and replace old data in Access table. TBui Microsoft Access External Data 0 29th May 2009 03:21 AM
Memo format field data problem - Data import from Access database AFSSkier Microsoft Excel Programming 0 29th Apr 2009 05:51 PM
import xml data into Access 2003 - deletes all data in file =?Utf-8?B?TGFycnlAVVNEQQ==?= Microsoft Access External Data 1 26th May 2006 07:18 PM
Import Data From Access to Excel - Return Modified Data To Access HVG Microsoft Access External Data 0 9th Dec 2005 08:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:16 PM.