Microsoft KB Archive/247861: Difference between revisions
(importing KB archive) |
m (Text replacement - "<" to "<") |
||
Line 100: | Line 100: | ||
OriginalName = Dir(CustExt, vbDirectory) | OriginalName = Dir(CustExt, vbDirectory) | ||
Do While OriginalName | Do While OriginalName <> "" ' Start the loop. | ||
' Replace your custom extension with "txt" | ' Replace your custom extension with "txt" | ||
NewName = Left(OriginalName, Len(OriginalName) - 3) & "txt" | NewName = Left(OriginalName, Len(OriginalName) - 3) & "txt" |
Revision as of 09:00, 21 July 2020
Article ID: 247861
Article Last Modified on 1/27/2007
APPLIES TO
- Microsoft Access 97 Standard Edition
This article was previously published under Q247861
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
After you install the latest service pack for Microsoft Jet 3.5, when you import text files, you may receive the following error message:
This is followed by:
CAUSE
The file that you are importing does not have a recognized file name extension.
RESOLUTION
Rename the file name extension so that it matches one of extensions listed in the "More Information" section later in this article.
You can change the file name extension manually or you can use code. Here is an example of code you can use:
Sub ChangeExt() Dim OriginalName, NewName, CustExt As String ' Set your custom extension CustExt = "*.cxt" ' Change to the appropriate folder ChDir (InputBox("What folder are the files in", "Locate Files")) ' Retrieve the first entry. OriginalName = Dir(CustExt, vbDirectory) Do While OriginalName <> "" ' Start the loop. ' Replace your custom extension with "txt" NewName = Left(OriginalName, Len(OriginalName) - 3) & "txt" Name OriginalName As NewName ' Rename the file OriginalName = Dir ' Get next entry. Loop MsgBox "Finished renaming files." End Sub
-or-
Modify the following registry key to include the extension of the file that you are importing.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\3.5\Engines\Text\DisabledExtensions
For additional information about setting this registry key see the More Information section of the following article, click the article number below to view the article in the Microsoft Knowledge Base:
239105 Jet 3.5 Text ISAM Allows Users to Append Lines to System Files
MORE INFORMATION
For security reasons, the latest service pack for Jet (by default) allows only text files with the following extensions to be imported:
- txt
- csv
- tab
- asc
- htm
- html
If you try to import a text file with any other extension, you will receive the error message mentioned in the "Symptoms" section.
Steps to Reproduce Behavior
- Install Microsoft Jet 3.5 Service Pack 3. For additional information about installing this service pack, click the article number below to view the article in the Microsoft Knowledge Base:
172733 Updated Version of Microsoft Jet 3.5 Available for Download
- Click Start, point to Programs, point to Accessories, and then click Notepad.
Type the following text:
1,John,Doe 2,John,Smith 3,John,Jones
- Save the file as C:\Test.dat, and then close it.
- Start Microsoft Access 97.
- Create a new database.
- On the File menu, point to Get External Data, and then click Import.
- In the Files of type list, click Text Files (*.txt;*.csv;*.tab;*.asc).
- In the File name box, type C:\Test.dat, and then press ENTER.
- Click Finish. Note that you receive the following error message:
REFERENCES
For additional information about errors you may receieve, click the article number below to view the article in the Microsoft Knowledge Base:
246634 ACC97: Invalid Page Fault in Text Import Wizard
Additional query words: prb can t update database or object is read only
Keywords: kberrmsg kbprb KB247861