Problem importing data form textfile

Hi,

We are migrating our database from Access 97 to Access 2003.
In our 97 version this line worked fine:

DoCmd.TransferText acImportFixed, "HDMARTPC", "tbl3031_HDMARTPCDAT",
"C:\HdbDatabase2003\hdmartpc.dat"

But in the 2003 version I am getting error 31519 (translated):
You can't import this file.

It seems that in Access 2003 it is no longer possible to read from a
textfile with a suffix .dat,
because when I rename my sourcefile to hdmartpc.txt, I can import this file
with no problem.
I only want to use the option to rename this file as a last resort, because
in the database there are many similar lines with links to other files.

Any help is appreciated





0
a
4/26/2007 7:54:41 AM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
995 Views

Similar Articles

[PageSpeed] 39

Your diagnosis is correct.

Microsoft wants you to use registered file types only.

Your choices are therefore:
- To register DAT as a file type to be handled by a text editor (such as 
Notepad)

- To save the file and then Name it as something different.

- To export the file in code (using Open, Print #, etc.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"a" <a@b.c> wrote in message news:%23vgR1g9hHHA.680@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> We are migrating our database from Access 97 to Access 2003.
> In our 97 version this line worked fine:
>
> DoCmd.TransferText acImportFixed, "HDMARTPC", "tbl3031_HDMARTPCDAT",
> "C:\HdbDatabase2003\hdmartpc.dat"
>
> But in the 2003 version I am getting error 31519 (translated):
> You can't import this file.
>
> It seems that in Access 2003 it is no longer possible to read from a
> textfile with a suffix .dat,
> because when I rename my sourcefile to hdmartpc.txt, I can import this 
> file
> with no problem.
> I only want to use the option to rename this file as a last resort, 
> because
> in the database there are many similar lines with links to other files.
>
> Any help is appreciated 

0
Allen
4/26/2007 8:23:23 AM
Thanks Allen,

In kb art. 304206 I read that editing the registry is also an option. I have
tried that and after a reboot the file imports well.
For some lines in my database that is a good solution, but I am also working
with textfiles that use 3 numbers as an extension.
I am not going to enter all possible values for these extensions, because
the number of extensions that we are using is about 500 and it is changing
from time to time.

Another MSDN search brought me to art. 239471. There is not only a
description of the DisabledExtensions key where you can add your own
extension, but also a description of the exclamation mark at the beginning
of the key values. Entering extensions without the exclamation mark, will
let Access connect to all file extensions, except the extensions in the key.



Allen Browne <AllenBrowne@SeeSig.Invalid> wrote in message
news:OdR7pw9hHHA.4976@TK2MSFTNGP03.phx.gbl...
> Your diagnosis is correct.
>
> Microsoft wants you to use registered file types only.
>
> Your choices are therefore:
> - To register DAT as a file type to be handled by a text editor (such as
> Notepad)
>
> - To save the file and then Name it as something different.
>
> - To export the file in code (using Open, Print #, etc.)
>
> --
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "a" <a@b.c> wrote in message
news:%23vgR1g9hHHA.680@TK2MSFTNGP06.phx.gbl...
> > Hi,
> >
> > We are migrating our database from Access 97 to Access 2003.
> > In our 97 version this line worked fine:
> >
> > DoCmd.TransferText acImportFixed, "HDMARTPC", "tbl3031_HDMARTPCDAT",
> > "C:\HdbDatabase2003\hdmartpc.dat"
> >
> > But in the 2003 version I am getting error 31519 (translated):
> > You can't import this file.
> >
> > It seems that in Access 2003 it is no longer possible to read from a
> > textfile with a suffix .dat,
> > because when I rename my sourcefile to hdmartpc.txt, I can import this
> > file
> > with no problem.
> > I only want to use the option to rename this file as a last resort,
> > because
> > in the database there are many similar lines with links to other files.
> >
> > Any help is appreciated
>


0
a
4/26/2007 2:23:12 PM
Hmm. Will this software only ever be used on one computer?
Can you guarantee these extensions will be entered on future computers as 
well?

If you have 500 extensions to handle, a rename would be better value to my 
way of thinking.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"a" <a@b.c> wrote in message
news:OLEW85AiHHA.4296@TK2MSFTNGP05.phx.gbl...
> Thanks Allen,
>
> In kb art. 304206 I read that editing the registry is also an option. I 
> have
> tried that and after a reboot the file imports well.
> For some lines in my database that is a good solution, but I am also 
> working
> with textfiles that use 3 numbers as an extension.
> I am not going to enter all possible values for these extensions, because
> the number of extensions that we are using is about 500 and it is changing
> from time to time.
>
> Another MSDN search brought me to art. 239471. There is not only a
> description of the DisabledExtensions key where you can add your own
> extension, but also a description of the exclamation mark at the beginning
> of the key values. Entering extensions without the exclamation mark, will
> let Access connect to all file extensions, except the extensions in the 
> key.
>
>
>
> Allen Browne <AllenBrowne@SeeSig.Invalid> wrote in message
> news:OdR7pw9hHHA.4976@TK2MSFTNGP03.phx.gbl...
>> Your diagnosis is correct.
>>
>> Microsoft wants you to use registered file types only.
>>
>> Your choices are therefore:
>> - To register DAT as a file type to be handled by a text editor (such as
>> Notepad)
>>
>> - To save the file and then Name it as something different.
>>
>> - To export the file in code (using Open, Print #, etc.)
>>
>> --
>> Allen Browne - Microsoft MVP.  Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "a" <a@b.c> wrote in message
> news:%23vgR1g9hHHA.680@TK2MSFTNGP06.phx.gbl...
>> > Hi,
>> >
>> > We are migrating our database from Access 97 to Access 2003.
>> > In our 97 version this line worked fine:
>> >
>> > DoCmd.TransferText acImportFixed, "HDMARTPC", "tbl3031_HDMARTPCDAT",
>> > "C:\HdbDatabase2003\hdmartpc.dat"
>> >
>> > But in the 2003 version I am getting error 31519 (translated):
>> > You can't import this file.
>> >
>> > It seems that in Access 2003 it is no longer possible to read from a
>> > textfile with a suffix .dat,
>> > because when I rename my sourcefile to hdmartpc.txt, I can import this
>> > file
>> > with no problem.
>> > I only want to use the option to rename this file as a last resort,
>> > because
>> > in the database there are many similar lines with links to other files.
>> >
>> > Any help is appreciated 

0
Allen
4/26/2007 2:46:04 PM
Reply:

Similar Artilces:

Problems migrating BCM data into CRM SB edition
Hi There I am having a problem migrating data from Business Contacts Manager (BCM) into CRM 3.0 Small Business edition. I have downloaded the BCM data migration pack and have followed the data migration documentation to the letter. I even cleaned up the BCM database prior to copying the files, checking them for errors using the Manage Database option in the Business Tools menu. It gets so far through the migration process and then bombs out. Here is the final few entries from the log file: 28/10/2006 12:18:53------>Transitioning to next screen. From: ConfigurationSummary screen. To: ...

double clicking and draging a column in a chart to chg data
in Excel 2003, double clicking on a column in a chart and then dragging the column up or down would change the data in a table upon which the chart depended. How does one do this in excel 2007? Tom Hi, That feature has been removed in 2007, there is no way to do it. If this helps, click the Yes button. -- Thanks, Shane Devenshire "Tom of inns" wrote: > in Excel 2003, double clicking on a column in a chart and then dragging the > column up or down would change the data in a table upon which the chart > depended. > > How does one do this in excel 2007? &g...

transfer data from multiple columns to singlr column
I have data in form a d g b e h c f i (but larger scale) and I need it in a single column going a to z. Hi, highlight you data, copy, go to the column where you want to see the data, paste special, transpose "lc85" wrote: > I have data in form a d g > b e h > c f i (but larger scale) > and I need it in a single column going a to z. You up for using a macro? Sub ToOneColumn() 'dantuck Mar 7, 2007 &...

CSV File Problem
Can any one explain why the following problem occurs please? A colleague has a small list of data which is a csv file exported from SQL. Column One is a serial number from 1 to 29. Column 2 is a number of transactions which have occurred.(it should look like example A below in Excel) 1 475 1,475 2 1732 21,732 3 1670 31,670 4 2176 42,176 5 608 5,608 6 1579 61,579 7 43101 743,101 8 54512 854,512 9 51258 951,258 10 61050 1,061,050 A B If I double click on the csv file, it opens in Excel but c...

Problems with creating a newsletter
I chose the form "Newsletter - email". I have created a 3 page newsletter. Now, I have NO IDEA how to send it out as an email. I do not want to send it as an attachment. I cannot figure out which "save as" format or what I need to do so that i can email this newsletter. Is there a website that goes through how to do this? Am I correct when I say that it has to be html in order for me to send it as email? That is not one of the options. Any help you give me would be greatly appreciated. Thank you, Markis www.adreamforabetterworld.com ...

Month problem
I have some code where I calculate this month minus 2 month. This goes fine until I get to august. When I use DateSerial to deduct 2 month I get to July, and this makes no sence. I made the following testcode. Sub StrangeMonth() Dim MyDate As Date MyDate = #8/31/2010# MsgBox DatePart("m", DateSerial(Year(MyDate), _ Month(MyDate) - 1, Day(MyDate))) ' MsgBox = 7 MsgBox DatePart("m", DateSerial(Year(MyDate), _ Month(MyDate) - 2, Day(MyDate))) ' MsgBox = 7 MsgBox DatePart(&qu...

Can't open 2005 data file after reinstalling Money 2005
I am experiencing a recurring problem. I have had to reinstall Windows XP and MS Money 2005. I am now unable to open my previously converted 2005 file or restore any backup version. I consistently get the following error message: "Money cannot locate filename or cannot open it, possibly because it is a read-only file, you do not have permission to change it, or your disk drive is write- protected. If you have chosen the correct file and it cannot be accessed, you will need to click OK and then Restore your most recent backup file." Any help or thoughts would be greatly ap...

import a 123 file
My excel version cannot open a Lotus 123 file. Is there an import feature to move the data from Lotus 123 to Excel? Thanks No, you need to convert the file either from Lotus 123 or get commercial converter -- Regards, Peo Sjoblom "Frank" <Frank@discussions.microsoft.com> wrote in message news:59B55F98-4C79-4917-928B-F1B309660730@microsoft.com... > My excel version cannot open a Lotus 123 file. Is there an import feature > to > move the data from Lotus 123 to Excel? > Thanks > > ...

How Do I Import Stock Quotes to Money2004 Standard?
Does anyone know how to import stock quotes into Money. Some of the ones I am interested in are not supported by MSN for online update. I know I can enter the data manually but I want to be able to update prices for multiple stocks on a regular basis. I have tried ceating a .ofx file for importing and Money reports "Import Completed" with no errors but the price I specified does not appear in the price history. The extract from the .ofx file relating to price I was trying to import is as follows: <SECLISTMSGSRSV1> <SECLIST> <STOCKINFO> <SECINFO> <S...

Word2007. Checkbox. No Form
Hello! We have a document (not a form) that we would like to use checkboxes in. This document has a couple of sections where it would be useful if the user could check if something is applicable. We can't protect the whole document. Thank you for your help! Stacey I actually used this feature in a form this morning. Although you don't say what version of Word you are using, you can access the Control Toolbox toolbar in Word 2003, or in Word 2007, it is on Developer tab. To show the developer tab, click the Microsoft Office Button and then click Word Options. S...

Rounding Problem
I am using the following formula: ROUND((BH24-BG24)*24,1) Where BH24 = 15:21, BG24 = 15:00 (times based on a 24 hour clock) The answer returned is 0.3, but it should be 0.4. If you round out to 2 places the answer is 0.35. Unless I am missing something 0.35 should round to 0.4. If I use Roundup, it rounds everything up. What am I missing? Hi this is due to Excel's representation of numbers (see: http://www.cpearson.com/excel/rounding.htm) In your case the formula =(BH24-BG24)*24 does not return 0.35 but 0.3499999999999 (Just test it and format the resulting cell with enough decima...

Offline folder problems #2
Hi Guys, Basically I installed Outlook 97 on my office PC which is connect to microsoft exchange server. For some reason all of my messages were copied into offline folders, this causes a problem, whenever I open up outlook I get this message. Upload of offline changes could not be completed you do not have sufficient permission to perform this operation on this object. See the folder contact or see your system administrator. I do not administrator access on my user profile, every time I open outlook it resets everything I have changed (view etc) and gives that error message. How ...

Customize Current View: Filter Problem
Hello, Using Outlook 2002, I have created a category called "Hidden" i outlook. In my calendar, I put all the appointments I don't want t appear in this calendar (i.e. daily reminders). I then filter out all these "Hidden" items by selecting -- View--> Current View--> Customize Current View--> Filter--> More Choices--> Categories--> Hidden (the category I created)--> OK--> SQL--> Edit these criteria directly--> And then I change: ("DAV:isfolder" = false AND "DAV:ishidden" = false) AN ("urn:schemas-microsoft...

Access 2007 and Vista code problem
I am developing a database on a XP SP2 machine. On a form I have created some buttons with event procedures that run 2 queries and open a form. I sent the db to someone running Access 2007 on a Vista machine and nothing happens when she clicks the buttons and there are no messages. I know nothing about Vista so thanks in advance for any help. Tim Might be a reference problem, have them open the open a code window and click tools references. See what says missing and tell them what should be there, Add it and it should work. Duff "Tim Reid" <TimReid@discussions.micr...

outlook 2k2 problem
I am using Outlook 2002 with SP3, and i have not had any problems up until a week ago. My password does not seem to save even though i have typed it in correctly in the e-mail acct settings ,and have checked "save password. It saves it as long as i have Outlook open, but as soon as i close it, and then later open it again, my password is gone and Outlook asks me for my e-mail password. So, i re-type and i check "save password". But if i decide to close Outlook (say for the evening, and shut down my computer or something), my password disappears the next time i open Outlo...

Resolving Email Address to existing contact problem
Has anyone else come across this issue in MSCRM3.0? - when you attempt to resolve an email address to an existing contact in CRM (that does not currently have an email address stored in their details) the contact resolves OK but does not update the email address in the contacts details. Is this by design, or have I found a bug? ...

OLK 2k7
Outlook is behaving strangly with the "through the selected account" option. Each time I restart Outlook the rule fails. When I go in to check on the rules I get told that the rule is "invalid". and the "SELECTED" account is no longer selected. Each time the criteria the account needs to be selected by changes. For example with the following data Account Name Email Account mailserver.domain1.com user@domain1.com mailserver.domain2.com user@domain2.com One time I go in and it's asking me to select the account ...

I would like to know how to set up a 'fill in the blanks' form?
I would like to set up a templet of sorts to fill in the blanks for certificates. ...

Mother of a sumproduct (ish) problem!
At least it is to me - now I humbly beseech your magic :) A1 to A10 contain 10 unique letters, e.g. A,Q,E... B1 to B10 contain 10 unique letters, e.g. Z,B,A... C1 to C100 contain nonunique letters, e.g. E,E,F,E,Q,Q... D1 to D100 contain nonunique letters, e.g. A,T,F,A,X,B... E1 to E100 contain values, e.g. 9,1,3,5,7,2... In pseudo logic, for x = 1 to 10 I want to find each Ax:Bx pairing in Cy:Dy and sum E when matched. So I want to sum Ey for the rows where [Cy is "A" and Dy is "Z"], plus each Ey where [Cy="Q" and Dy="B"], etc. for the sample...

Copying Data in a cell in one sheet to a cell in another sheet
I've run into a problem trying to copy data from a cell in one sheet to another. I have a spreadsheet called "rating" which contains a number of formula that calculates a final number. I also have a spreadsheet called "Final" that copies over the information from "Rating". In "Final", I'm trying to copy a number from "Rating" into a particular cell. I put in =Rating! G89, but it won't work. When I press enter, a window pops up "Update value:Rating". I press enter again and in the cell where I want the number ...

printing imported gif files in Excel
When printing gif file with transparent background on the grey(25%) background of Excel non-transparent part of the picture has white border around it. Is there any way to prevent it? Thank you in advance... Tim ...

Customer check data
When customers pay by check RMS asks for specific information such as drivers license number, routing number, account number, address and phone number. Does anyone have a report and or a way to extract this info from the database for cases when the check is returned for NSF? Please advise, Scott We can write you this report. Contact me for detail on price . Afshin Alikhani - [ afshin@retailrealm.co.uk ] CEO - Retail Realm = = = = = = = = = = "Scott Santorio" <scott@tt-newyork.com> wrote in message news:e8ZKkR6$HHA.3716@TK2MSFTNGP03.phx.gbl... > When customers pa...

Macro to seperate data
Hi I seem to be struggling to find a macro that will work in previous threads. In sheet 1 is a list of data in columns A:N and the number of rows will vary. It is a list of sales with each sale record ocuppying one row. The salesperson's name is in column C and each salesperson will have multiple entries. What I am trying to do is create a seperate summary sheet in the workbook for each salesperson. Therefore sheets 2 to 20 are templates that already exist with a different salesperson's name entered into cell C3 on each of them. I am trying to find a macro that ...

Need HELP! for Linking data
Could someone please direct me to where I can learn how to link date in a work book. i.e., I have individual pages for each subject but I need the data that is entered in these individual pages to transfer to the Master page without having to manually in put it.........TNX Bubey, There are not too many bits about linking worksheets or workbooks that I can find. But have a look at the links below, in case they give you the information you need. I think it is frustratingly one of those things which is very easy when you know how, or if you can get someone to actually show you, but if you hav...

Problem with Database Wizard
I'm trying to generate a diagram based on the contents of an Access database, using the database to provide x,y coords for instances of a Master shape. It seems I need to run the wizard twice, first to link a master, then to generate the drawing. The first bit appears to work OK, but when I do the second bit, Visio says that there is no master in the stencil that it can use. But I know the master is connected, because if I modify the database, then refresh the shapes, they change accordingly. Does anyone have any idea why this isn't working for me ? I'm using Visio 20...